Commit d99828ee by Jonathan Wakely Committed by Jonathan Wakely

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
parent d19df8b2
2019-11-14 Jonathan Wakely <jwakely@redhat.com>
* 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 <jwakely@redhat.com> 2019-11-13 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/compare (strong_order, weak_order, partial_order) * libsupc++/compare (strong_order, weak_order, partial_order)
......
...@@ -524,11 +524,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -524,11 +524,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
&& __detail::__weakly_eq_cmp_with<_Sent, _Iter>; && __detail::__weakly_eq_cmp_with<_Sent, _Iter>;
template<typename _Sent, typename _Iter> template<typename _Sent, typename _Iter>
inline constexpr bool disable_sized_sentinel = false; inline constexpr bool disable_sized_sentinel_for = false;
template<typename _Sent, typename _Iter> template<typename _Sent, typename _Iter>
concept sized_sentinel_for = sentinel_for<_Sent, _Iter> concept sized_sentinel_for = sentinel_for<_Sent, _Iter>
&& !disable_sized_sentinel<remove_cv_t<_Sent>, remove_cv_t<_Iter>> && !disable_sized_sentinel_for<remove_cv_t<_Sent>, remove_cv_t<_Iter>>
&& requires(const _Iter& __i, const _Sent& __s) && requires(const _Iter& __i, const _Sent& __s)
{ {
{ __s - __i } -> same_as<iter_difference_t<_Iter>>; { __s - __i } -> same_as<iter_difference_t<_Iter>>;
......
...@@ -449,9 +449,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -449,9 +449,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
# if __cplusplus > 201703L && defined __cpp_lib_concepts # if __cplusplus > 201703L && defined __cpp_lib_concepts
template<typename _Iterator1, typename _Iterator2> template<typename _Iterator1, typename _Iterator2>
requires (!sized_sentinel_for<_Iterator1, _Iterator2>) requires (!sized_sentinel_for<_Iterator1, _Iterator2>)
inline constexpr bool disable_sized_sentinel<reverse_iterator<_Iterator1>, inline constexpr bool
reverse_iterator<_Iterator2>> disable_sized_sentinel_for<reverse_iterator<_Iterator1>,
= true; reverse_iterator<_Iterator2>> = true;
# endif // C++20 # endif // C++20
# endif // C++14 # endif // C++14
......
...@@ -79,7 +79,7 @@ namespace std ...@@ -79,7 +79,7 @@ namespace std
} }
struct I { }; struct I { };
template<> constexpr bool std::disable_sized_sentinel<I, I> = true; template<> constexpr bool std::disable_sized_sentinel_for<I, I> = true;
namespace __gnu_test namespace __gnu_test
{ {
...@@ -87,8 +87,8 @@ namespace __gnu_test ...@@ -87,8 +87,8 @@ namespace __gnu_test
constexpr auto* iter_move = &std::ranges::iter_move; constexpr auto* iter_move = &std::ranges::iter_move;
constexpr auto* iter_swap = &std::ranges::iter_swap; constexpr auto* iter_swap = &std::ranges::iter_swap;
// sized sentinels // sized sentinels
constexpr bool const* disable_sized_sentinel constexpr bool const* disable_sized_sentinel_for
= &std::disable_sized_sentinel<void, void>; = &std::disable_sized_sentinel_for<void, void>;
// default sentinels // default sentinels
constexpr std::default_sentinel_t const* default_sentinel constexpr std::default_sentinel_t const* default_sentinel
= &std::default_sentinel; = &std::default_sentinel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment