diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h --- a/libcxx/include/__iterator/common_iterator.h +++ b/libcxx/include/__iterator/common_iterator.h @@ -148,7 +148,7 @@ auto __tmp = *this; ++*this; return __tmp; - } else if constexpr (requires (_Iter& __i) { { *__i++ } -> __referenceable; } || + } else if constexpr (requires (_Iter& __i) { { *__i++ } -> __can_reference; } || !__can_use_postfix_proxy<_Iter>) { return _VSTD::__unchecked_get<_Iter>(__hold_)++; } else { diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h --- a/libcxx/include/__iterator/concepts.h +++ b/libcxx/include/__iterator/concepts.h @@ -90,7 +90,7 @@ template concept input_or_output_iterator = requires(_Ip __i) { - { *__i } -> __referenceable; + { *__i } -> __can_reference; } && weakly_incrementable<_Ip>; diff --git a/libcxx/include/__iterator/iter_move.h b/libcxx/include/__iterator/iter_move.h --- a/libcxx/include/__iterator/iter_move.h +++ b/libcxx/include/__iterator/iter_move.h @@ -83,7 +83,7 @@ } // namespace ranges template<__dereferenceable _Tp> - requires requires(_Tp& __t) { { ranges::iter_move(__t) } -> __referenceable; } + requires requires(_Tp& __t) { { ranges::iter_move(__t) } -> __can_reference; } using iter_rvalue_reference_t = decltype(ranges::iter_move(declval<_Tp&>())); #endif // !_LIBCPP_HAS_NO_CONCEPTS diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h --- a/libcxx/include/__iterator/iterator_traits.h +++ b/libcxx/include/__iterator/iterator_traits.h @@ -28,13 +28,13 @@ using __with_reference = _Tp&; template -concept __referenceable = requires { +concept __can_reference = requires { typename __with_reference<_Tp>; }; template concept __dereferenceable = requires(_Tp& __t) { - { *__t } -> __referenceable; // not required to be equality-preserving + { *__t } -> __can_reference; // not required to be equality-preserving }; // [iterator.traits] @@ -147,9 +147,9 @@ template concept __cpp17_iterator = requires(_Ip __i) { - { *__i } -> __referenceable; + { *__i } -> __can_reference; { ++__i } -> same_as<_Ip&>; - { *__i++ } -> __referenceable; + { *__i++ } -> __can_reference; } && copyable<_Ip>; diff --git a/libcxx/include/__ranges/transform_view.h b/libcxx/include/__ranges/transform_view.h --- a/libcxx/include/__ranges/transform_view.h +++ b/libcxx/include/__ranges/transform_view.h @@ -53,7 +53,7 @@ concept __transform_view_constraints = view<_View> && is_object_v<_Fn> && regular_invocable<_Fn&, range_reference_t<_View>> && - __referenceable>>; + __can_reference>>; template requires __transform_view_constraints<_View, _Fn>