diff --git a/libcxx/include/__algorithm/in_in_out_result.h b/libcxx/include/__algorithm/in_in_out_result.h --- a/libcxx/include/__algorithm/in_in_out_result.h +++ b/libcxx/include/__algorithm/in_in_out_result.h @@ -16,7 +16,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#ifndef _LIBCPP_HAS_NO_RANGES +#ifndef _LIBCPP_HAS_NO_CONCEPTS namespace ranges { template @@ -41,7 +41,7 @@ }; } // namespace ranges -#endif // _LIBCPP_HAS_NO_RANGES +#endif // _LIBCPP_HAS_NO_CONCEPTS _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/in_in_result.h b/libcxx/include/__algorithm/in_in_result.h --- a/libcxx/include/__algorithm/in_in_result.h +++ b/libcxx/include/__algorithm/in_in_result.h @@ -16,7 +16,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#ifndef _LIBCPP_HAS_NO_RANGES +#ifndef _LIBCPP_HAS_NO_CONCEPTS namespace ranges { template @@ -38,7 +38,7 @@ }; } // namespace ranges -#endif // _LIBCPP_HAS_NO_RANGES +#endif // _LIBCPP_HAS_NO_CONCEPTS _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/in_out_result.h b/libcxx/include/__algorithm/in_out_result.h --- a/libcxx/include/__algorithm/in_out_result.h +++ b/libcxx/include/__algorithm/in_out_result.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -45,7 +45,7 @@ }; } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -875,14 +875,10 @@ # define _LIBCPP_CONSTEVAL consteval #endif -#if !defined(__cpp_concepts) || __cpp_concepts < 201907L +#if _LIBCPP_STD_VER <= 17 || !defined(__cpp_concepts) || __cpp_concepts < 201907L #define _LIBCPP_HAS_NO_CONCEPTS #endif -#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_HAS_NO_CONCEPTS) -#define _LIBCPP_HAS_NO_RANGES -#endif - #ifdef __GNUC__ # define _LIBCPP_NOALIAS __attribute__((__malloc__)) #else diff --git a/libcxx/include/__filesystem/directory_iterator.h b/libcxx/include/__filesystem/directory_iterator.h --- a/libcxx/include/__filesystem/directory_iterator.h +++ b/libcxx/include/__filesystem/directory_iterator.h @@ -133,7 +133,7 @@ _LIBCPP_END_NAMESPACE_FILESYSTEM -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template <> _LIBCPP_AVAILABILITY_FILESYSTEM diff --git a/libcxx/include/__filesystem/recursive_directory_iterator.h b/libcxx/include/__filesystem/recursive_directory_iterator.h --- a/libcxx/include/__filesystem/recursive_directory_iterator.h +++ b/libcxx/include/__filesystem/recursive_directory_iterator.h @@ -164,7 +164,7 @@ _LIBCPP_END_NAMESPACE_FILESYSTEM -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template <> _LIBCPP_AVAILABILITY_FILESYSTEM diff --git a/libcxx/include/__functional/ranges_operations.h b/libcxx/include/__functional/ranges_operations.h --- a/libcxx/include/__functional/ranges_operations.h +++ b/libcxx/include/__functional/ranges_operations.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { struct equal_to { @@ -90,7 +90,7 @@ }; } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h --- a/libcxx/include/__iterator/advance.h +++ b/libcxx/include/__iterator/advance.h @@ -64,7 +64,7 @@ _VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category()); } -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // [range.iter.op.advance] @@ -192,7 +192,7 @@ } // namespace __cpo } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD 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 @@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template concept __can_use_postfix_proxy = @@ -276,7 +276,7 @@ using reference = iter_reference_t<_Iter>; }; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD 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 @@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // [iterator.concept.readable] template @@ -257,7 +257,7 @@ // Note: indirectly_swappable is located in iter_swap.h to prevent a dependency cycle // (both iter_swap and indirectly_swappable require indirectly_readable). -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/counted_iterator.h b/libcxx/include/__iterator/counted_iterator.h --- a/libcxx/include/__iterator/counted_iterator.h +++ b/libcxx/include/__iterator/counted_iterator.h @@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template struct __counted_iterator_concept {}; @@ -296,7 +296,7 @@ add_pointer_t>, void>; }; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/default_sentinel.h b/libcxx/include/__iterator/default_sentinel.h --- a/libcxx/include/__iterator/default_sentinel.h +++ b/libcxx/include/__iterator/default_sentinel.h @@ -18,12 +18,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) struct default_sentinel_t { }; inline constexpr default_sentinel_t default_sentinel{}; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/incrementable_traits.h b/libcxx/include/__iterator/incrementable_traits.h --- a/libcxx/include/__iterator/incrementable_traits.h +++ b/libcxx/include/__iterator/incrementable_traits.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // [incrementable.traits] template struct incrementable_traits {}; @@ -65,7 +65,7 @@ incrementable_traits >, iterator_traits > >::difference_type; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/indirectly_comparable.h b/libcxx/include/__iterator/indirectly_comparable.h --- a/libcxx/include/__iterator/indirectly_comparable.h +++ b/libcxx/include/__iterator/indirectly_comparable.h @@ -17,13 +17,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#ifndef _LIBCPP_HAS_NO_RANGES +#ifndef _LIBCPP_HAS_NO_CONCEPTS template concept indirectly_comparable = indirect_binary_predicate<_Rp, projected<_I1, _P1>, projected<_I2, _P2>>; -#endif // _LIBCPP_HAS_NO_RANGES +#endif // _LIBCPP_HAS_NO_CONCEPTS _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/insert_iterator.h b/libcxx/include/__iterator/insert_iterator.h --- a/libcxx/include/__iterator/insert_iterator.h +++ b/libcxx/include/__iterator/insert_iterator.h @@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) template using __insert_iterator_iter_t = ranges::iterator_t<_Container>; #else 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 @@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // [iterator.cust.move] @@ -84,7 +84,7 @@ requires requires(_Tp& __t) { { ranges::iter_move(__t) } -> __referenceable; } using iter_rvalue_reference_t = decltype(ranges::iter_move(declval<_Tp&>())); -#endif // !_LIBCPP_HAS_NO_RANGES +#endif // !_LIBCPP_HAS_NO_CONCEPTS _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/iter_swap.h b/libcxx/include/__iterator/iter_swap.h --- a/libcxx/include/__iterator/iter_swap.h +++ b/libcxx/include/__iterator/iter_swap.h @@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // [iter.cust.swap] @@ -98,7 +98,7 @@ ranges::iter_swap(__i2, __i1); }; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD 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 @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template using __with_reference = _Tp&; @@ -41,7 +41,7 @@ template<__dereferenceable _Tp> using iter_reference_t = decltype(*declval<_Tp&>()); -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) template struct _LIBCPP_TEMPLATE_VIS iterator_traits; @@ -139,7 +139,7 @@ static const bool value = sizeof(__test<_Tp>(nullptr)) == 1; }; -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // The `cpp17-*-iterator` exposition-only concepts are easily confused with the Cpp17*Iterator tables, // so they've been banished to a namespace that makes it obvious they have a niche use-case. @@ -362,7 +362,7 @@ using __primary_template = iterator_traits; }; -#else // !defined(_LIBCPP_HAS_NO_RANGES) +#else // !defined(_LIBCPP_HAS_NO_CONCEPTS) template struct __iterator_traits {}; @@ -399,10 +399,10 @@ using __primary_template = iterator_traits; }; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) template -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) requires is_object_v<_Tp> #endif struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*> diff --git a/libcxx/include/__iterator/next.h b/libcxx/include/__iterator/next.h --- a/libcxx/include/__iterator/next.h +++ b/libcxx/include/__iterator/next.h @@ -35,7 +35,7 @@ return __x; } -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // [range.iter.op.next] @@ -79,7 +79,7 @@ } // namespace __cpo } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/prev.h b/libcxx/include/__iterator/prev.h --- a/libcxx/include/__iterator/prev.h +++ b/libcxx/include/__iterator/prev.h @@ -34,7 +34,7 @@ return __x; } -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // [range.iter.op.prev] @@ -71,7 +71,7 @@ } // namespace __cpo } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/projected.h b/libcxx/include/__iterator/projected.h --- a/libcxx/include/__iterator/projected.h +++ b/libcxx/include/__iterator/projected.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template _Proj> struct projected { @@ -33,7 +33,7 @@ using difference_type = iter_difference_t<_It>; }; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/readable_traits.h b/libcxx/include/__iterator/readable_traits.h --- a/libcxx/include/__iterator/readable_traits.h +++ b/libcxx/include/__iterator/readable_traits.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // [readable.traits] template struct __cond_value_type {}; @@ -79,7 +79,7 @@ indirectly_readable_traits >, iterator_traits > >::value_type; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/unreachable_sentinel.h b/libcxx/include/__iterator/unreachable_sentinel.h --- a/libcxx/include/__iterator/unreachable_sentinel.h +++ b/libcxx/include/__iterator/unreachable_sentinel.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) struct unreachable_sentinel_t { template @@ -31,7 +31,7 @@ inline constexpr unreachable_sentinel_t unreachable_sentinel{}; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__memory/concepts.h b/libcxx/include/__memory/concepts.h --- a/libcxx/include/__memory/concepts.h +++ b/libcxx/include/__memory/concepts.h @@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { // [special.mem.concepts] @@ -59,7 +59,7 @@ __nothrow_forward_iterator>; } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__memory/ranges_construct_at.h b/libcxx/include/__memory/ranges_construct_at.h --- a/libcxx/include/__memory/ranges_construct_at.h +++ b/libcxx/include/__memory/ranges_construct_at.h @@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { // construct_at @@ -117,7 +117,7 @@ } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__memory/ranges_uninitialized_algorithms.h b/libcxx/include/__memory/ranges_uninitialized_algorithms.h --- a/libcxx/include/__memory/ranges_uninitialized_algorithms.h +++ b/libcxx/include/__memory/ranges_uninitialized_algorithms.h @@ -32,7 +32,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { // uninitialized_default_construct @@ -309,7 +309,7 @@ } // namespace __cpo } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/access.h b/libcxx/include/__ranges/access.h --- a/libcxx/include/__ranges/access.h +++ b/libcxx/include/__ranges/access.h @@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -213,7 +213,7 @@ } // namespace __cpo } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/all.h b/libcxx/include/__ranges/all.h --- a/libcxx/include/__ranges/all.h +++ b/libcxx/include/__ranges/all.h @@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges::views { @@ -75,7 +75,7 @@ } // namespace ranges::views -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/common_view.h b/libcxx/include/__ranges/common_view.h --- a/libcxx/include/__ranges/common_view.h +++ b/libcxx/include/__ranges/common_view.h @@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { @@ -128,7 +128,7 @@ } // namespace views } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/concepts.h b/libcxx/include/__ranges/concepts.h --- a/libcxx/include/__ranges/concepts.h +++ b/libcxx/include/__ranges/concepts.h @@ -32,7 +32,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { // [range.range] @@ -133,7 +133,7 @@ } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/copyable_box.h b/libcxx/include/__ranges/copyable_box.h --- a/libcxx/include/__ranges/copyable_box.h +++ b/libcxx/include/__ranges/copyable_box.h @@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // __copyable_box allows turning a type that is copy-constructible (but maybe not copy-assignable) into // a type that is both copy-constructible and copy-assignable. It does that by introducing an empty state @@ -171,7 +171,7 @@ }; } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/counted.h b/libcxx/include/__ranges/counted.h --- a/libcxx/include/__ranges/counted.h +++ b/libcxx/include/__ranges/counted.h @@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges::views { @@ -74,7 +74,7 @@ } // namespace ranges::views -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/dangling.h b/libcxx/include/__ranges/dangling.h --- a/libcxx/include/__ranges/dangling.h +++ b/libcxx/include/__ranges/dangling.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { struct dangling { @@ -35,7 +35,7 @@ // borrowed_subrange_t defined in <__ranges/subrange.h> } // namespace ranges -#endif // !_LIBCPP_HAS_NO_RANGES +#endif // !_LIBCPP_HAS_NO_CONCEPTS _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/data.h b/libcxx/include/__ranges/data.h --- a/libcxx/include/__ranges/data.h +++ b/libcxx/include/__ranges/data.h @@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // [range.prim.data] @@ -99,7 +99,7 @@ } // namespace __cpo } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/drop_view.h b/libcxx/include/__ranges/drop_view.h --- a/libcxx/include/__ranges/drop_view.h +++ b/libcxx/include/__ranges/drop_view.h @@ -31,7 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -120,7 +120,7 @@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Tp>; } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/empty.h b/libcxx/include/__ranges/empty.h --- a/libcxx/include/__ranges/empty.h +++ b/libcxx/include/__ranges/empty.h @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // [range.prim.empty] @@ -75,7 +75,7 @@ } // namespace __cpo } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/empty_view.h b/libcxx/include/__ranges/empty_view.h --- a/libcxx/include/__ranges/empty_view.h +++ b/libcxx/include/__ranges/empty_view.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -38,7 +38,7 @@ inline constexpr bool enable_borrowed_range> = true; } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/enable_borrowed_range.h b/libcxx/include/__ranges/enable_borrowed_range.h --- a/libcxx/include/__ranges/enable_borrowed_range.h +++ b/libcxx/include/__ranges/enable_borrowed_range.h @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { @@ -34,7 +34,7 @@ } // namespace ranges -#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/enable_view.h b/libcxx/include/__ranges/enable_view.h --- a/libcxx/include/__ranges/enable_view.h +++ b/libcxx/include/__ranges/enable_view.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { @@ -40,7 +40,7 @@ } // namespace ranges -#endif // !_LIBCPP_HAS_NO_RANGES +#endif // !_LIBCPP_HAS_NO_CONCEPTS _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/iota_view.h b/libcxx/include/__ranges/iota_view.h --- a/libcxx/include/__ranges/iota_view.h +++ b/libcxx/include/__ranges/iota_view.h @@ -39,7 +39,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -401,7 +401,7 @@ } // namespace views } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/join_view.h b/libcxx/include/__ranges/join_view.h --- a/libcxx/include/__ranges/join_view.h +++ b/libcxx/include/__ranges/join_view.h @@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -343,7 +343,7 @@ #undef _CONSTEXPR_TERNARY -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/non_propagating_cache.h b/libcxx/include/__ranges/non_propagating_cache.h --- a/libcxx/include/__ranges/non_propagating_cache.h +++ b/libcxx/include/__ranges/non_propagating_cache.h @@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { // __non_propagating_cache is a helper type that allows storing an optional value in it, @@ -107,7 +107,7 @@ struct __empty_cache { }; } // namespace ranges -#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/owning_view.h b/libcxx/include/__ranges/owning_view.h --- a/libcxx/include/__ranges/owning_view.h +++ b/libcxx/include/__ranges/owning_view.h @@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -74,7 +74,7 @@ } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/range_adaptor.h b/libcxx/include/__ranges/range_adaptor.h --- a/libcxx/include/__ranges/range_adaptor.h +++ b/libcxx/include/__ranges/range_adaptor.h @@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // CRTP base that one can derive from in order to be considered a range adaptor closure // by the library. When deriving from this class, a pipe operator will be provided to @@ -66,7 +66,7 @@ { return __range_adaptor_closure_t(_VSTD::__compose(_VSTD::forward<_OtherClosure>(__c2), _VSTD::forward<_Closure>(__c1))); } }; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/ref_view.h b/libcxx/include/__ranges/ref_view.h --- a/libcxx/include/__ranges/ref_view.h +++ b/libcxx/include/__ranges/ref_view.h @@ -31,7 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -79,7 +79,7 @@ inline constexpr bool enable_borrowed_range> = true; } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/reverse_view.h b/libcxx/include/__ranges/reverse_view.h --- a/libcxx/include/__ranges/reverse_view.h +++ b/libcxx/include/__ranges/reverse_view.h @@ -33,7 +33,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -183,7 +183,7 @@ } // namespace views } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/single_view.h b/libcxx/include/__ranges/single_view.h --- a/libcxx/include/__ranges/single_view.h +++ b/libcxx/include/__ranges/single_view.h @@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -74,7 +74,7 @@ single_view(_Tp) -> single_view<_Tp>; } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/size.h b/libcxx/include/__ranges/size.h --- a/libcxx/include/__ranges/size.h +++ b/libcxx/include/__ranges/size.h @@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -128,7 +128,7 @@ } // namespace __cpo } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h --- a/libcxx/include/__ranges/subrange.h +++ b/libcxx/include/__ranges/subrange.h @@ -36,7 +36,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -282,7 +282,7 @@ using type = _Sp; }; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/take_view.h b/libcxx/include/__ranges/take_view.h --- a/libcxx/include/__ranges/take_view.h +++ b/libcxx/include/__ranges/take_view.h @@ -34,7 +34,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { template @@ -176,7 +176,7 @@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Tp>; } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD 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 @@ -42,7 +42,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { @@ -434,7 +434,7 @@ } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__ranges/view_interface.h b/libcxx/include/__ranges/view_interface.h --- a/libcxx/include/__ranges/view_interface.h +++ b/libcxx/include/__ranges/view_interface.h @@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { @@ -188,7 +188,7 @@ } -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/ranges b/libcxx/include/ranges --- a/libcxx/include/ranges +++ b/libcxx/include/ranges @@ -239,11 +239,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace views = ranges::views; -#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/span b/libcxx/include/span --- a/libcxx/include/span +++ b/libcxx/include/span @@ -170,7 +170,7 @@ template struct __is_std_span> : true_type {}; -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template concept __span_compatible_range = ranges::contiguous_range<_Range> && @@ -210,7 +210,7 @@ constexpr span (const span&) noexcept = default; constexpr span& operator=(const span&) noexcept = default; -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template && is_convertible_v>(*)[], element_type (*)[]>, @@ -248,7 +248,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr span(const array<_OtherElementType, _Extent>& __arr) noexcept : __data{__arr.data()} {} -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template <__span_compatible_range _Range> _LIBCPP_INLINE_VISIBILITY constexpr explicit span(_Range&& __r) : __data{ranges::data(__r)} { @@ -401,7 +401,7 @@ constexpr span (const span&) noexcept = default; constexpr span& operator=(const span&) noexcept = default; -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template && is_convertible_v > (*)[], element_type (*)[]>, @@ -434,7 +434,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr span(const array<_OtherElementType, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {} -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template <__span_compatible_range _Range> _LIBCPP_INLINE_VISIBILITY constexpr span(_Range&& __r) : __data(ranges::data(__r)), __size{ranges::size(__r)} {} @@ -543,13 +543,13 @@ size_type __size; }; -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template inline constexpr bool ranges::enable_borrowed_range > = true; template inline constexpr bool ranges::enable_view> = true; -#endif // !defined(_LIBCPP_HAS_NO_RANGES) +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) // as_bytes & as_writable_bytes template @@ -564,7 +564,7 @@ -> enable_if_t, decltype(__s.__as_writable_bytes())> { return __s.__as_writable_bytes(); } -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) // Deduction guides template span(_It, _EndOrSize) -> span>>; @@ -579,7 +579,7 @@ template span(const array<_Tp, _Sz>&) -> span; -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) template span(_Range&&) -> span>>; #endif diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -286,7 +286,7 @@ #endif } -#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) template _End> requires (is_same_v, _CharT> && !is_convertible_v<_End, size_type>) constexpr _LIBCPP_HIDE_FROM_ABI basic_string_view(_It __begin, _End __end) @@ -296,7 +296,7 @@ } #endif -#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_RANGES) +#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS) template requires ( !is_same_v, basic_string_view> && @@ -707,23 +707,23 @@ size_type __size; }; -#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) template inline constexpr bool ranges::enable_view> = true; template inline constexpr bool ranges::enable_borrowed_range > = true; -#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) // [string.view.deduct] -#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) template _End> basic_string_view(_It, _End) -> basic_string_view>; #endif -#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_RANGES) +#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS) template basic_string_view(_Range) -> basic_string_view>; #endif diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp @@ -31,7 +31,7 @@ using It = path::iterator; using Traits = std::iterator_traits; ASSERT_SAME_TYPE(path::const_iterator, It); -#if TEST_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES) +#if TEST_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) static_assert(std::bidirectional_iterator); #endif ASSERT_SAME_TYPE(Traits::value_type, path); diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -243,7 +243,7 @@ #define LIBCPP_ONLY(...) static_assert(true, "") #endif -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) #define TEST_SUPPORTS_RANGES #endif diff --git a/libcxx/test/support/test_range.h b/libcxx/test/support/test_range.h --- a/libcxx/test/support/test_range.h +++ b/libcxx/test/support/test_range.h @@ -13,7 +13,7 @@ #include "test_iterators.h" -#ifdef _LIBCPP_HAS_NO_RANGES +#ifdef _LIBCPP_HAS_NO_CONCEPTS #error "test/support/test_range.h" can only be included in builds supporting ranges #endif