mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-07 19:03:57 +00:00
[libc++] Merge _LIBCPP_HAS_NO_RANGES into _LIBCPP_HAS_NO_CONCEPTS. NFC.
The macro that opts out of `std::ranges::` functionality is called `_LIBCPP_HAS_NO_INCOMPLETE_RANGES`, and is unrelated to this macro which is specifically about _compiler_ support for the _syntax_. The only non-mechanical diff here is in `<__config>`. Differential Revision: https://reviews.llvm.org/D118507
This commit is contained in:
parent
aae947e860
commit
2eb2ff2a02
@ -16,7 +16,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RANGES
|
||||
#ifndef _LIBCPP_HAS_NO_CONCEPTS
|
||||
|
||||
namespace ranges {
|
||||
template <class _I1, class _I2, class _O1>
|
||||
@ -41,7 +41,7 @@ struct in_in_out_result {
|
||||
};
|
||||
} // namespace ranges
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RANGES
|
||||
#endif // _LIBCPP_HAS_NO_CONCEPTS
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RANGES
|
||||
#ifndef _LIBCPP_HAS_NO_CONCEPTS
|
||||
|
||||
namespace ranges {
|
||||
template <class _I1, class _I2>
|
||||
@ -38,7 +38,7 @@ struct in_in_result {
|
||||
};
|
||||
} // namespace ranges
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RANGES
|
||||
#endif // _LIBCPP_HAS_NO_CONCEPTS
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
namespace ranges {
|
||||
|
||||
template<class _InputIterator, class _OutputIterator>
|
||||
@ -45,7 +45,7 @@ struct in_out_result {
|
||||
};
|
||||
|
||||
} // namespace ranges
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -875,14 +875,10 @@ typedef unsigned int char32_t;
|
||||
# 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
|
||||
|
@ -133,7 +133,7 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_POP
|
||||
|
||||
_LIBCPP_END_NAMESPACE_FILESYSTEM
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
template <>
|
||||
_LIBCPP_AVAILABILITY_FILESYSTEM
|
||||
|
@ -164,7 +164,7 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_POP
|
||||
|
||||
_LIBCPP_END_NAMESPACE_FILESYSTEM
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
template <>
|
||||
_LIBCPP_AVAILABILITY_FILESYSTEM
|
||||
|
@ -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 @@ struct greater_equal {
|
||||
};
|
||||
|
||||
} // namespace ranges
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -64,7 +64,7 @@ void advance(_InputIter& __i, _Distance __orig_n) {
|
||||
_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 @@ inline namespace __cpo {
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
template<class _Iter>
|
||||
concept __can_use_postfix_proxy =
|
||||
@ -276,7 +276,7 @@ struct iterator_traits<common_iterator<_Iter, _Sent>> {
|
||||
using reference = iter_reference_t<_Iter>;
|
||||
};
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
// [iterator.concept.readable]
|
||||
template<class _In>
|
||||
@ -257,7 +257,7 @@ concept indirectly_movable_storable =
|
||||
// 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
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
template<class>
|
||||
struct __counted_iterator_concept {};
|
||||
@ -296,7 +296,7 @@ struct iterator_traits<counted_iterator<_Iter>> : iterator_traits<_Iter> {
|
||||
add_pointer_t<iter_reference_t<_Iter>>, void>;
|
||||
};
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
// [incrementable.traits]
|
||||
template<class> struct incrementable_traits {};
|
||||
@ -65,7 +65,7 @@ using iter_difference_t = typename conditional_t<__is_primary_template<iterator_
|
||||
incrementable_traits<remove_cvref_t<_Ip> >,
|
||||
iterator_traits<remove_cvref_t<_Ip> > >::difference_type;
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -17,13 +17,13 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RANGES
|
||||
#ifndef _LIBCPP_HAS_NO_CONCEPTS
|
||||
|
||||
template <class _I1, class _I2, class _Rp, class _P1 = identity, class _P2 = identity>
|
||||
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
|
||||
|
||||
|
@ -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 <class _Container>
|
||||
using __insert_iterator_iter_t = ranges::iterator_t<_Container>;
|
||||
#else
|
||||
|
@ -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 @@ template<__dereferenceable _Tp>
|
||||
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
|
||||
|
||||
|
@ -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 @@ concept indirectly_swappable =
|
||||
ranges::iter_swap(__i2, __i1);
|
||||
};
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
template <class _Tp>
|
||||
using __with_reference = _Tp&;
|
||||
@ -41,7 +41,7 @@ concept __dereferenceable = requires(_Tp& __t) {
|
||||
template<__dereferenceable _Tp>
|
||||
using iter_reference_t = decltype(*declval<_Tp&>());
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
template <class _Iter>
|
||||
struct _LIBCPP_TEMPLATE_VIS iterator_traits;
|
||||
@ -139,7 +139,7 @@ public:
|
||||
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 @@ struct iterator_traits : __iterator_traits<_Ip> {
|
||||
using __primary_template = iterator_traits;
|
||||
};
|
||||
|
||||
#else // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#else // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
template <class _Iter, bool> struct __iterator_traits {};
|
||||
|
||||
@ -399,10 +399,10 @@ struct _LIBCPP_TEMPLATE_VIS iterator_traits
|
||||
|
||||
using __primary_template = iterator_traits;
|
||||
};
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
template<class _Tp>
|
||||
#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*>
|
||||
|
@ -35,7 +35,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
|
||||
return __x;
|
||||
}
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
// [range.iter.op.next]
|
||||
|
||||
@ -79,7 +79,7 @@ inline namespace __cpo {
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -34,7 +34,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
|
||||
return __x;
|
||||
}
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
// [range.iter.op.prev]
|
||||
|
||||
@ -71,7 +71,7 @@ inline namespace __cpo {
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
template<indirectly_readable _It, indirectly_regular_unary_invocable<_It> _Proj>
|
||||
struct projected {
|
||||
@ -33,7 +33,7 @@ struct incrementable_traits<projected<_It, _Proj>> {
|
||||
using difference_type = iter_difference_t<_It>;
|
||||
};
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
// [readable.traits]
|
||||
template<class> struct __cond_value_type {};
|
||||
@ -79,7 +79,7 @@ using iter_value_t = typename conditional_t<__is_primary_template<iterator_trait
|
||||
indirectly_readable_traits<remove_cvref_t<_Ip> >,
|
||||
iterator_traits<remove_cvref_t<_Ip> > >::value_type;
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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<weakly_incrementable _Iter>
|
||||
@ -31,7 +31,7 @@ struct unreachable_sentinel_t {
|
||||
|
||||
inline constexpr unreachable_sentinel_t unreachable_sentinel{};
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ concept __nothrow_forward_range =
|
||||
__nothrow_forward_iterator<iterator_t<_Rp>>;
|
||||
|
||||
} // namespace ranges
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ inline namespace __cpo {
|
||||
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ inline namespace __cpo {
|
||||
} // namespace __cpo
|
||||
|
||||
} // namespace ranges
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template <class _Tp>
|
||||
@ -213,7 +213,7 @@ inline namespace __cpo {
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ using all_t = decltype(views::all(declval<_Range>()));
|
||||
|
||||
} // namespace ranges::views
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ inline namespace __cpo {
|
||||
} // namespace views
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 {
|
||||
};
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ inline namespace __cpo {
|
||||
|
||||
} // namespace ranges::views
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ using borrowed_iterator_t = _If<borrowed_range<_Rp>, iterator_t<_Rp>, dangling>;
|
||||
// borrowed_subrange_t defined in <__ranges/subrange.h>
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !_LIBCPP_HAS_NO_RANGES
|
||||
#endif // !_LIBCPP_HAS_NO_CONCEPTS
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ inline namespace __cpo {
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<view _View>
|
||||
@ -120,7 +120,7 @@ public:
|
||||
inline constexpr bool enable_borrowed_range<drop_view<_Tp>> = enable_borrowed_range<_Tp>;
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ inline namespace __cpo {
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<class _Tp>
|
||||
@ -38,7 +38,7 @@ namespace ranges {
|
||||
inline constexpr bool enable_borrowed_range<empty_view<_Tp>> = true;
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ inline constexpr bool enable_borrowed_range = false;
|
||||
|
||||
} // 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
|
||||
|
||||
|
@ -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 @@ inline constexpr bool enable_view = derived_from<_Tp, view_base> ||
|
||||
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !_LIBCPP_HAS_NO_RANGES
|
||||
#endif // !_LIBCPP_HAS_NO_CONCEPTS
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<class _Int>
|
||||
@ -401,7 +401,7 @@ inline namespace __cpo {
|
||||
} // namespace views
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<class>
|
||||
@ -343,7 +343,7 @@ namespace ranges {
|
||||
|
||||
#undef _CONSTEXPR_TERNARY
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ namespace ranges {
|
||||
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
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<range _Rp>
|
||||
@ -74,7 +74,7 @@ public:
|
||||
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ struct __range_adaptor_closure {
|
||||
{ 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
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<range _Range>
|
||||
@ -79,7 +79,7 @@ public:
|
||||
inline constexpr bool enable_borrowed_range<ref_view<_Tp>> = true;
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<view _View>
|
||||
@ -183,7 +183,7 @@ namespace ranges {
|
||||
} // namespace views
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<copy_constructible _Tp>
|
||||
@ -74,7 +74,7 @@ namespace ranges {
|
||||
single_view(_Tp) -> single_view<_Tp>;
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<class>
|
||||
@ -128,7 +128,7 @@ inline namespace __cpo {
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<class _From, class _To>
|
||||
@ -282,7 +282,7 @@ struct tuple_element<1, const ranges::subrange<_Ip, _Sp, _Kp>> {
|
||||
using type = _Sp;
|
||||
};
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -34,7 +34,7 @@ _LIBCPP_PUSH_MACROS
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
namespace ranges {
|
||||
template<view _View>
|
||||
@ -176,7 +176,7 @@ public:
|
||||
inline constexpr bool enable_borrowed_range<take_view<_Tp>> = enable_borrowed_range<_Tp>;
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ inline namespace __cpo {
|
||||
|
||||
} // namespace ranges
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -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 @@ public:
|
||||
|
||||
}
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@ -239,11 +239,11 @@ namespace std::ranges {
|
||||
|
||||
_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
|
||||
|
||||
|
@ -170,7 +170,7 @@ struct __is_std_span : false_type {};
|
||||
template <class _Tp, size_t _Sz>
|
||||
struct __is_std_span<span<_Tp, _Sz>> : true_type {};
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
template <class _Range, class _ElementType>
|
||||
concept __span_compatible_range =
|
||||
ranges::contiguous_range<_Range> &&
|
||||
@ -210,7 +210,7 @@ public:
|
||||
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 <class _It,
|
||||
enable_if_t<contiguous_iterator<_It> &&
|
||||
is_convertible_v<remove_reference_t<iter_reference_t<_It>>(*)[], element_type (*)[]>,
|
||||
@ -248,7 +248,7 @@ public:
|
||||
_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<element_type> _Range>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
constexpr explicit span(_Range&& __r) : __data{ranges::data(__r)} {
|
||||
@ -401,7 +401,7 @@ public:
|
||||
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 <class _It,
|
||||
enable_if_t<contiguous_iterator<_It> &&
|
||||
is_convertible_v<remove_reference_t<iter_reference_t<_It> > (*)[], element_type (*)[]>,
|
||||
@ -434,7 +434,7 @@ public:
|
||||
_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<element_type> _Range>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
constexpr span(_Range&& __r) : __data(ranges::data(__r)), __size{ranges::size(__r)} {}
|
||||
@ -543,13 +543,13 @@ private:
|
||||
size_type __size;
|
||||
};
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
template <class _Tp, size_t _Extent>
|
||||
inline constexpr bool ranges::enable_borrowed_range<span<_Tp, _Extent> > = true;
|
||||
|
||||
template <class _ElementType, size_t _Extent>
|
||||
inline constexpr bool ranges::enable_view<span<_ElementType, _Extent>> = true;
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
// as_bytes & as_writable_bytes
|
||||
template <class _Tp, size_t _Extent>
|
||||
@ -564,7 +564,7 @@ auto as_writable_bytes(span<_Tp, _Extent> __s) noexcept
|
||||
-> enable_if_t<!is_const_v<_Tp>, 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<contiguous_iterator _It, class _EndOrSize>
|
||||
span(_It, _EndOrSize) -> span<remove_reference_t<iter_reference_t<_It>>>;
|
||||
@ -579,7 +579,7 @@ template<class _Tp, size_t _Sz>
|
||||
template<class _Tp, size_t _Sz>
|
||||
span(const array<_Tp, _Sz>&) -> span<const _Tp, _Sz>;
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
template<ranges::contiguous_range _Range>
|
||||
span(_Range&&) -> span<remove_reference_t<ranges::range_reference_t<_Range>>>;
|
||||
#endif
|
||||
|
@ -286,7 +286,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
template <contiguous_iterator _It, sized_sentinel_for<_It> _End>
|
||||
requires (is_same_v<iter_value_t<_It>, _CharT> && !is_convertible_v<_End, size_type>)
|
||||
constexpr _LIBCPP_HIDE_FROM_ABI basic_string_view(_It __begin, _End __end)
|
||||
@ -296,7 +296,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
template <class _Range>
|
||||
requires (
|
||||
!is_same_v<remove_cvref_t<_Range>, basic_string_view> &&
|
||||
@ -707,23 +707,23 @@ private:
|
||||
size_type __size;
|
||||
};
|
||||
|
||||
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
template <class _CharT, class _Traits>
|
||||
inline constexpr bool ranges::enable_view<basic_string_view<_CharT, _Traits>> = true;
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline constexpr bool ranges::enable_borrowed_range<basic_string_view<_CharT, _Traits> > = 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 <contiguous_iterator _It, sized_sentinel_for<_It> _End>
|
||||
basic_string_view(_It, _End) -> basic_string_view<iter_value_t<_It>>;
|
||||
#endif
|
||||
|
||||
|
||||
#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_RANGES)
|
||||
#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
template <ranges::contiguous_range _Range>
|
||||
basic_string_view(_Range) -> basic_string_view<ranges::range_value_t<_Range>>;
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@ void checkIteratorConcepts() {
|
||||
using It = path::iterator;
|
||||
using Traits = std::iterator_traits<It>;
|
||||
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<It>);
|
||||
#endif
|
||||
ASSERT_SAME_TYPE(Traits::value_type, path);
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user