diff options
author | François Dumont <fdumont@gcc.gnu.org> | 2019-11-26 06:07:23 +0000 |
---|---|---|
committer | François Dumont <fdumont@gcc.gnu.org> | 2019-11-26 06:07:23 +0000 |
commit | db58c8e919e0045052e481db426304986bac3cd9 (patch) | |
tree | 3ed196be807c5b2272f8dc94572f94d6dbe7ce45 | |
parent | 616f21732e20970b13beff51db6863eb213e53af (diff) | |
download | gcc-db58c8e919e0045052e481db426304986bac3cd9.zip gcc-db58c8e919e0045052e481db426304986bac3cd9.tar.gz gcc-db58c8e919e0045052e481db426304986bac3cd9.tar.bz2 |
libstdc++: Add _GLIBCXX_DEBUG safe iterator C++20 iterator concept
* include/debug/safe_iterator.h
[__cpp_lib_concepts](_Safe_iterator<>::iterator_concept): Define for
C++20.
From-SVN: r278717
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/safe_iterator.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4ea06a3..986ac2a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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 diff --git a/libstdc++-v3/include/debug/safe_iterator.h b/libstdc++-v3/include/debug/safe_iterator.h index 6700eaf..fa0d03f 100644 --- a/libstdc++-v3/include/debug/safe_iterator.h +++ b/libstdc++-v3/include/debug/safe_iterator.h @@ -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() { } |