libstdc++: Add _GLIBCXX_DEBUG safe iterator C++20 iterator concept
authorFrançois Dumont <fdumont@gcc.gnu.org>
Tue, 26 Nov 2019 06:07:23 +0000 (06:07 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Tue, 26 Nov 2019 06:07:23 +0000 (06:07 +0000)
* include/debug/safe_iterator.h
[__cpp_lib_concepts](_Safe_iterator<>::iterator_concept): Define for
C++20.

From-SVN: r278717

libstdc++-v3/ChangeLog
libstdc++-v3/include/debug/safe_iterator.h

index 4ea06a37a1f9d18ec589eee4d908d3cb9383de08..986ac2a00c6dd12a92b847cf3a776dda08463f53 100644 (file)
@@ -1,3 +1,9 @@
+2019-11-26  François Dumont  <fdumont@gcc.gnu.org>
+
+       * include/debug/safe_iterator.h
+       [__cpp_lib_concepts](_Safe_iterator<>::iterator_concept): Define for
+       C++20.
+
 2019-11-25  Jonathan Wakely  <jwakely@redhat.com>
 
        * include/bits/iterator_concepts.h (ranges::iter_swap): Fix parameter
index 6700eafca0b42ab3cb26bc58806c198ad99de183..fa0d03f39dc164349acf0a26229d90382a227257 100644 (file)
@@ -140,6 +140,10 @@ namespace __gnu_debug
       typedef typename _Traits::reference              reference;
       typedef typename _Traits::pointer                        pointer;
 
+#if __cplusplus > 201703L && __cpp_lib_concepts
+      using iterator_concept = std::__detail::__iter_concept<_Iterator>;
+#endif
+
       /// @post the iterator is singular and unattached
       _Safe_iterator() _GLIBCXX_NOEXCEPT : _Iter_base() { }