From d99828eea22b6ae852f993ce8732d686faf63c95 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 14 Nov 2019 16:53:03 +0000 Subject: [PATCH] libstdc++: Rename disable_sized_sentinel [P1871R1] * include/bits/iterator_concepts.h (disable_sized_sentinel): Rename to disable_sized_sentinel_for. * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust. From-SVN: r278255 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/bits/iterator_concepts.h | 4 ++-- libstdc++-v3/include/bits/stl_iterator.h | 6 +++--- .../24_iterators/headers/iterator/synopsis_c++20.cc | 6 +++--- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b073c688187..75f4eeb992d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2019-11-14 Jonathan Wakely + + * include/bits/iterator_concepts.h (disable_sized_sentinel): Rename to + disable_sized_sentinel_for. + * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust. + 2019-11-13 Jonathan Wakely * libsupc++/compare (strong_order, weak_order, partial_order) diff --git a/libstdc++-v3/include/bits/iterator_concepts.h b/libstdc++-v3/include/bits/iterator_concepts.h index 8b398616a56..7cc058eb8c9 100644 --- a/libstdc++-v3/include/bits/iterator_concepts.h +++ b/libstdc++-v3/include/bits/iterator_concepts.h @@ -524,11 +524,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION && __detail::__weakly_eq_cmp_with<_Sent, _Iter>; template - inline constexpr bool disable_sized_sentinel = false; + inline constexpr bool disable_sized_sentinel_for = false; template concept sized_sentinel_for = sentinel_for<_Sent, _Iter> - && !disable_sized_sentinel, remove_cv_t<_Iter>> + && !disable_sized_sentinel_for, remove_cv_t<_Iter>> && requires(const _Iter& __i, const _Sent& __s) { { __s - __i } -> same_as>; diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index 411feba90e0..a707621c9ed 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -449,9 +449,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION # if __cplusplus > 201703L && defined __cpp_lib_concepts template requires (!sized_sentinel_for<_Iterator1, _Iterator2>) - inline constexpr bool disable_sized_sentinel, - reverse_iterator<_Iterator2>> - = true; + inline constexpr bool + disable_sized_sentinel_for, + reverse_iterator<_Iterator2>> = true; # endif // C++20 # endif // C++14 diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++20.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++20.cc index 824b0b4f38c..fb3bb420a54 100644 --- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++20.cc +++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++20.cc @@ -79,7 +79,7 @@ namespace std } struct I { }; -template<> constexpr bool std::disable_sized_sentinel = true; +template<> constexpr bool std::disable_sized_sentinel_for = true; namespace __gnu_test { @@ -87,8 +87,8 @@ namespace __gnu_test constexpr auto* iter_move = &std::ranges::iter_move; constexpr auto* iter_swap = &std::ranges::iter_swap; // sized sentinels - constexpr bool const* disable_sized_sentinel - = &std::disable_sized_sentinel; + constexpr bool const* disable_sized_sentinel_for + = &std::disable_sized_sentinel_for; // default sentinels constexpr std::default_sentinel_t const* default_sentinel = &std::default_sentinel; -- 2.30.2