forked from OSchip/llvm-project
[libc++][NFC] Rename the constexpr macros
This was discussed on Discord with the consensus that we should rename the macros. Reviewed By: ldionne, Mordante, var-const, avogelsgesang, jloser, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D131498
This commit is contained in:
parent
ac31781759
commit
5146b57b40
|
@ -12,10 +12,10 @@ AllowShortFunctionsOnASingleLine: true
|
|||
AllowShortLambdasOnASingleLine: All
|
||||
AttributeMacros: ['_LIBCPP_HIDE_FROM_ABI',
|
||||
'_LIBCPP_CONSTEXPR',
|
||||
'_LIBCPP_CONSTEXPR_AFTER_CXX11',
|
||||
'_LIBCPP_CONSTEXPR_AFTER_CXX14',
|
||||
'_LIBCPP_CONSTEXPR_AFTER_CXX17',
|
||||
'_LIBCPP_CONSTEXPR_AFTER_CXX20',
|
||||
'_LIBCPP_CONSTEXPR_SINCE_CXX14',
|
||||
'_LIBCPP_CONSTEXPR_SINCE_CXX17',
|
||||
'_LIBCPP_CONSTEXPR_SINCE_CXX20',
|
||||
'_LIBCPP_CONSTEXPR_SINCE_CXX23',
|
||||
'_LIBCPP_ALIGNOF',
|
||||
'_ALIGNAS_TYPE',
|
||||
'_ALIGNAS',
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Iter, class _Sent, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter
|
||||
__adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
|
||||
if (__first == __last)
|
||||
return __first;
|
||||
|
@ -37,13 +37,13 @@ __adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
|
||||
return std::__adjacent_find(std::move(__first), std::move(__last), __pred);
|
||||
}
|
||||
|
||||
template <class _ForwardIterator>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
adjacent_find(_ForwardIterator __first, _ForwardIterator __last) {
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type __v;
|
||||
return std::adjacent_find(std::move(__first), std::move(__last), __equal_to<__v>());
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _Predicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
|
||||
for (; __first != __last; ++__first)
|
||||
if (!__pred(*__first))
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _Predicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
|
||||
for (; __first != __last; ++__first)
|
||||
if (__pred(*__first))
|
||||
|
|
|
@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
template <class _ForwardIterator, class _Tp, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __va
|
|||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
|
||||
{
|
||||
|
|
|
@ -23,67 +23,67 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
template <class _T1, class _T2 = _T1>
|
||||
struct __equal_to
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T1& __x, const _T2& __y) const {return __x == __y;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T2& __x, const _T1& __y) const {return __x == __y;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T2& __x, const _T2& __y) const {return __x == __y;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _T1& __x, const _T2& __y) const {return __x == __y;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _T2& __x, const _T1& __y) const {return __x == __y;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _T2& __x, const _T2& __y) const {return __x == __y;}
|
||||
};
|
||||
|
||||
template <class _T1>
|
||||
struct __equal_to<_T1, _T1>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
|
||||
};
|
||||
|
||||
template <class _T1>
|
||||
struct __equal_to<const _T1, _T1>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
|
||||
};
|
||||
|
||||
template <class _T1>
|
||||
struct __equal_to<_T1, const _T1>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
|
||||
};
|
||||
|
||||
template <class _T1, class _T2 = _T1>
|
||||
struct __less
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _T1& __x, const _T2& __y) const {return __x < __y;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _T2& __x, const _T1& __y) const {return __x < __y;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _T2& __x, const _T2& __y) const {return __x < __y;}
|
||||
};
|
||||
|
||||
template <class _T1>
|
||||
struct __less<_T1, _T1>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
|
||||
};
|
||||
|
||||
template <class _T1>
|
||||
struct __less<const _T1, _T1>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
|
||||
};
|
||||
|
||||
template <class _T1>
|
||||
struct __less<_T1, const _T1>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
|
||||
};
|
||||
|
||||
|
|
|
@ -23,11 +23,11 @@ template <class _Compare>
|
|||
struct __debug_less
|
||||
{
|
||||
_Compare &__comp_;
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
__debug_less(_Compare& __c) : __comp_(__c) {}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(const _Tp& __x, const _Up& __y)
|
||||
{
|
||||
bool __r = __comp_(__x, __y);
|
||||
|
@ -37,7 +37,7 @@ struct __debug_less
|
|||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(_Tp& __x, _Up& __y)
|
||||
{
|
||||
bool __r = __comp_(__x, __y);
|
||||
|
@ -47,7 +47,7 @@ struct __debug_less
|
|||
}
|
||||
|
||||
template <class _LHS, class _RHS>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
decltype((void)declval<_Compare&>()(
|
||||
declval<_LHS &>(), declval<_RHS &>()))
|
||||
|
@ -59,7 +59,7 @@ struct __debug_less
|
|||
}
|
||||
|
||||
template <class _LHS, class _RHS>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __do_compare_assert(long, _LHS &, _RHS &) {}
|
||||
};
|
||||
|
|
|
@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
// copy
|
||||
|
||||
template <class _InIter, class _Sent, class _OutIter>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_InIter, _OutIter> __copy_impl(_InIter __first, _Sent __last, _OutIter __result) {
|
||||
while (__first != __last) {
|
||||
*__result = *__first;
|
||||
|
@ -42,7 +42,7 @@ template <class _InValueT,
|
|||
class _OutValueT,
|
||||
class = __enable_if_t<is_same<typename remove_const<_InValueT>::type, _OutValueT>::value
|
||||
&& is_trivially_copy_assignable<_OutValueT>::value> >
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_InValueT*, _OutValueT*> __copy_impl(_InValueT* __first, _InValueT* __last, _OutValueT* __result) {
|
||||
if (__libcpp_is_constant_evaluated()
|
||||
// TODO: Remove this once GCC supports __builtin_memmove during constant evaluation
|
||||
|
@ -64,7 +64,7 @@ template <class _InIter, class _OutIter,
|
|||
&& is_trivially_copy_assignable<__iter_value_type<_OutIter> >::value
|
||||
&& __is_reverse_iterator<_InIter>::value
|
||||
&& __is_reverse_iterator<_OutIter>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_InIter, _OutIter>
|
||||
__copy_impl(_InIter __first, _InIter __last, _OutIter __result) {
|
||||
auto __first_base = std::__unwrap_iter(__first.base());
|
||||
|
@ -79,7 +79,7 @@ template <class _InIter, class _Sent, class _OutIter,
|
|||
__enable_if_t<!(is_copy_constructible<_InIter>::value
|
||||
&& is_copy_constructible<_Sent>::value
|
||||
&& is_copy_constructible<_OutIter>::value), int> = 0 >
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_InIter, _OutIter> __copy(_InIter __first, _Sent __last, _OutIter __result) {
|
||||
return std::__copy_impl(std::move(__first), std::move(__last), std::move(__result));
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ template <class _InIter, class _Sent, class _OutIter,
|
|||
__enable_if_t<is_copy_constructible<_InIter>::value
|
||||
&& is_copy_constructible<_Sent>::value
|
||||
&& is_copy_constructible<_OutIter>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_InIter, _OutIter> __copy(_InIter __first, _Sent __last, _OutIter __result) {
|
||||
auto __range = std::__unwrap_range(__first, __last);
|
||||
auto __ret = std::__copy_impl(std::move(__range.first), std::move(__range.second), std::__unwrap_iter(__result));
|
||||
|
@ -97,7 +97,7 @@ pair<_InIter, _OutIter> __copy(_InIter __first, _Sent __last, _OutIter __result)
|
|||
}
|
||||
|
||||
template <class _InputIterator, class _OutputIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
|
||||
return std::__copy(__first, __last, __result).second;
|
||||
|
|
|
@ -31,7 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
template <class _AlgPolicy, class _InputIterator, class _OutputIterator,
|
||||
__enable_if_t<is_same<_AlgPolicy, _ClassicAlgPolicy>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 pair<_InputIterator, _OutputIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InputIterator, _OutputIterator>
|
||||
__copy_backward(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
|
||||
auto __ret = std::__copy(
|
||||
__unconstrained_reverse_iterator<_InputIterator>(__last),
|
||||
|
@ -52,7 +52,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr pair<_Iter1, _Iter2> __copy_backward(_Iter1 __fi
|
|||
#endif // _LIBCPP_STD_VER > 17
|
||||
|
||||
template <class _BidirectionalIterator1, class _BidirectionalIterator2>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _BidirectionalIterator2
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _BidirectionalIterator2
|
||||
copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last, _BidirectionalIterator2 __result) {
|
||||
return std::__copy_backward<_ClassicAlgPolicy>(__first, __last, __result).second;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template<class _InputIterator, class _OutputIterator, class _Predicate>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
copy_if(_InputIterator __first, _InputIterator __last,
|
||||
_OutputIterator __result, _Predicate __pred)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template<class _InputIterator, class _Size, class _OutputIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
typename enable_if
|
||||
<
|
||||
__is_cpp17_input_iterator<_InputIterator>::value &&
|
||||
|
@ -48,7 +48,7 @@ copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
|
|||
}
|
||||
|
||||
template<class _InputIterator, class _Size, class _OutputIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
typename enable_if
|
||||
<
|
||||
__is_cpp17_random_access_iterator<_InputIterator>::value,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
typename iterator_traits<_InputIterator>::difference_type
|
||||
count(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
|
||||
typename iterator_traits<_InputIterator>::difference_type __r(0);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _Predicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
typename iterator_traits<_InputIterator>::difference_type
|
||||
count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
|
||||
typename iterator_traits<_InputIterator>::difference_type __r(0);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
|
||||
for (; __first1 != __last1; ++__first1, (void)++__first2)
|
||||
if (!__pred(*__first1, *__first2))
|
||||
|
@ -31,7 +31,7 @@ equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
|
||||
typedef typename iterator_traits<_InputIterator1>::value_type __v1;
|
||||
typedef typename iterator_traits<_InputIterator2>::value_type __v2;
|
||||
|
@ -40,7 +40,7 @@ equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first
|
|||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
template <class _BinaryPredicate, class _InputIterator1, class _InputIterator2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
__equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
|
||||
_BinaryPredicate __pred, input_iterator_tag, input_iterator_tag) {
|
||||
for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2)
|
||||
|
@ -50,7 +50,7 @@ __equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __fir
|
|||
}
|
||||
|
||||
template <class _BinaryPredicate, class _RandomAccessIterator1, class _RandomAccessIterator2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
__equal(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _RandomAccessIterator2 __first2,
|
||||
_RandomAccessIterator2 __last2, _BinaryPredicate __pred, random_access_iterator_tag,
|
||||
random_access_iterator_tag) {
|
||||
|
@ -61,7 +61,7 @@ __equal(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _Random
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
|
||||
_BinaryPredicate __pred) {
|
||||
return _VSTD::__equal<_BinaryPredicate&>(
|
||||
|
@ -70,7 +70,7 @@ equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
|
||||
typedef typename iterator_traits<_InputIterator1>::value_type __v1;
|
||||
typedef typename iterator_traits<_InputIterator2>::value_type __v2;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_Iter, _Iter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_Iter, _Iter>
|
||||
__equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) {
|
||||
auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
|
||||
_Iter __end = _IterOps<_AlgPolicy>::next(__first, __last);
|
||||
|
@ -58,7 +58,7 @@ __equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
|
||||
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
|
||||
static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value,
|
||||
"The comparator has to be callable");
|
||||
|
@ -70,7 +70,7 @@ equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
|
||||
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
|
||||
return std::equal_range(
|
||||
std::move(__first),
|
||||
|
|
|
@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
// fill isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
__fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, forward_iterator_tag)
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ __fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, fo
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
__fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value, random_access_iterator_tag)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ __fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& _
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
// fill_n isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.
|
||||
|
||||
template <class _OutputIterator, class _Size, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
__fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
|
|||
}
|
||||
|
||||
template <class _OutputIterator, class _Size, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
|
||||
find(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
|
||||
for (; __first != __last; ++__first)
|
||||
if (*__first == __value)
|
||||
|
|
|
@ -37,7 +37,7 @@ template <
|
|||
class _Pred,
|
||||
class _Proj1,
|
||||
class _Proj2>
|
||||
_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_AFTER_CXX11 pair<_Iter1, _Iter1> __find_end_impl(
|
||||
_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __find_end_impl(
|
||||
_Iter1 __first1,
|
||||
_Sent1 __last1,
|
||||
_Iter2 __first2,
|
||||
|
@ -91,7 +91,7 @@ template <
|
|||
class _Sent2,
|
||||
class _Proj1,
|
||||
class _Proj2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter1 __find_end(
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter1 __find_end(
|
||||
_Iter1 __first1,
|
||||
_Sent1 __sent1,
|
||||
_Iter2 __first2,
|
||||
|
@ -144,7 +144,7 @@ template <
|
|||
class _Sent2,
|
||||
class _Proj1,
|
||||
class _Proj2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iter1 __find_end(
|
||||
_Iter1 __first1,
|
||||
_Sent1 __sent1,
|
||||
_Iter2 __first2,
|
||||
|
@ -189,7 +189,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
|
|||
}
|
||||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_ForwardIterator1 __find_end_classic(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
||||
_ForwardIterator2 __first2, _ForwardIterator2 __last2,
|
||||
_BinaryPredicate& __pred) {
|
||||
|
@ -208,7 +208,7 @@ _ForwardIterator1 __find_end_classic(_ForwardIterator1 __first1, _ForwardIterato
|
|||
}
|
||||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
||||
_ForwardIterator2 __first2, _ForwardIterator2 __last2,
|
||||
_BinaryPredicate __pred) {
|
||||
|
@ -216,7 +216,7 @@ _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1
|
|||
}
|
||||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
||||
_ForwardIterator2 __first2, _ForwardIterator2 __last2) {
|
||||
using __v1 = typename iterator_traits<_ForwardIterator1>::value_type;
|
||||
|
|
|
@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator1 __find_first_of_ce(_ForwardIterator1 __first1,
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator1 __find_first_of_ce(_ForwardIterator1 __first1,
|
||||
_ForwardIterator1 __last1,
|
||||
_ForwardIterator2 __first2,
|
||||
_ForwardIterator2 __last2,
|
||||
|
@ -35,14 +35,14 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator1 __find_first_of_ce(_ForwardItera
|
|||
}
|
||||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator1
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1
|
||||
find_first_of(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
||||
_ForwardIterator2 __last2, _BinaryPredicate __pred) {
|
||||
return _VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred);
|
||||
}
|
||||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator1 find_first_of(
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1 find_first_of(
|
||||
_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
|
||||
typedef typename iterator_traits<_ForwardIterator1>::value_type __v1;
|
||||
typedef typename iterator_traits<_ForwardIterator2>::value_type __v2;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _Predicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
|
||||
find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
|
||||
for (; __first != __last; ++__first)
|
||||
if (__pred(*__first))
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _Predicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
|
||||
find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
|
||||
for (; __first != __last; ++__first)
|
||||
if (!__pred(*__first))
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _Function>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Function for_each(_InputIterator __first,
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Function for_each(_InputIterator __first,
|
||||
_InputIterator __last,
|
||||
_Function __f) {
|
||||
for (; __first != __last; ++__first)
|
||||
|
|
|
@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
#if _LIBCPP_STD_VER > 14
|
||||
|
||||
template <class _InputIterator, class _Size, class _Function>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator for_each_n(_InputIterator __first,
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator for_each_n(_InputIterator __first,
|
||||
_Size __orig_n,
|
||||
_Function __f) {
|
||||
typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _ForwardIterator, class _Generator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _OutputIterator, class _Size, class _Generator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Comp, class _Proj1, class _Proj2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
__includes(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
|
||||
_Comp&& __comp, _Proj1&& __proj1, _Proj2&& __proj2) {
|
||||
for (; __first2 != __last2; ++__first1) {
|
||||
|
@ -39,7 +39,7 @@ __includes(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool includes(
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool includes(
|
||||
_InputIterator1 __first1,
|
||||
_InputIterator1 __last1,
|
||||
_InputIterator2 __first2,
|
||||
|
@ -55,7 +55,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
|
||||
return std::includes(
|
||||
std::move(__first1),
|
||||
|
|
|
@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
template <class _RandomAccessIterator, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __
|
|||
|
||||
template<class _RandomAccessIterator>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Compare, class _RandomAccessIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
|
||||
__is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp)
|
||||
{
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
|
||||
|
@ -48,7 +48,7 @@ __is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Co
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
|
||||
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
|
||||
{
|
||||
typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
|
||||
|
@ -56,7 +56,7 @@ is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp
|
|||
}
|
||||
|
||||
template<class _RandomAccessIterator>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
|
||||
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
|
||||
{
|
||||
return _VSTD::__is_heap_until(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _Predicate>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred)
|
||||
{
|
||||
for (; __first != __last; ++__first)
|
||||
|
|
|
@ -55,7 +55,7 @@ struct _ConstTimeDistance<_Iter1, _Iter1, _Iter2, _Iter2, __enable_if_t<
|
|||
template <class _AlgPolicy,
|
||||
class _Iter1, class _Sent1, class _Iter2, class _Sent2,
|
||||
class _Proj1, class _Proj2, class _Pred>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
__is_permutation_impl(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
|
||||
_Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2) {
|
||||
using _D1 = __iter_diff_t<_Iter1>;
|
||||
|
@ -94,7 +94,7 @@ __is_permutation_impl(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 _
|
|||
|
||||
// 2+1 iterators, predicate. Not used by range algorithms.
|
||||
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
__is_permutation(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2,
|
||||
_BinaryPredicate&& __pred) {
|
||||
// Shorten sequences as much as possible by lopping of any equal prefix.
|
||||
|
@ -122,7 +122,7 @@ __is_permutation(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterato
|
|||
template <class _AlgPolicy,
|
||||
class _Iter1, class _Sent1, class _Iter2, class _Sent2,
|
||||
class _Proj1, class _Proj2, class _Pred>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
__is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
|
||||
_Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2,
|
||||
/*_ConstTimeDistance=*/false_type) {
|
||||
|
@ -156,7 +156,7 @@ __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last
|
|||
template <class _AlgPolicy,
|
||||
class _Iter1, class _Sent1, class _Iter2, class _Sent2,
|
||||
class _Proj1, class _Proj2, class _Pred>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
__is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
|
||||
_Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2,
|
||||
/*_ConstTimeDistance=*/true_type) {
|
||||
|
@ -172,7 +172,7 @@ __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last
|
|||
template <class _AlgPolicy,
|
||||
class _Iter1, class _Sent1, class _Iter2, class _Sent2,
|
||||
class _Proj1, class _Proj2, class _Pred>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
__is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
|
||||
_Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2) {
|
||||
return std::__is_permutation<_AlgPolicy>(
|
||||
|
@ -185,7 +185,7 @@ __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last
|
|||
|
||||
// 2+1 iterators, predicate
|
||||
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
||||
_BinaryPredicate __pred) {
|
||||
static_assert(__is_callable<_BinaryPredicate, decltype(*__first1), decltype(*__first2)>::value,
|
||||
|
@ -197,7 +197,7 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIt
|
|||
|
||||
// 2+1 iterators
|
||||
template <class _ForwardIterator1, class _ForwardIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) {
|
||||
using __v1 = __iter_value_type<_ForwardIterator1>;
|
||||
using __v2 = __iter_value_type<_ForwardIterator2>;
|
||||
|
@ -208,7 +208,7 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIt
|
|||
|
||||
// 2+2 iterators
|
||||
template <class _ForwardIterator1, class _ForwardIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
||||
_ForwardIterator2 __last2) {
|
||||
using __v1 = __iter_value_type<_ForwardIterator1>;
|
||||
|
@ -221,7 +221,7 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIt
|
|||
|
||||
// 2+2 iterators, predicate
|
||||
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
||||
_ForwardIterator2 __last2, _BinaryPredicate __pred) {
|
||||
static_assert(__is_callable<_BinaryPredicate, decltype(*__first1), decltype(*__first2)>::value,
|
||||
|
|
|
@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
template <class _ForwardIterator, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
|||
|
||||
template<class _ForwardIterator>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
is_sorted(_ForwardIterator __first, _ForwardIterator __last)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Compare, class _ForwardIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
__is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
||||
{
|
||||
if (__first != __last)
|
||||
|
@ -38,7 +38,7 @@ __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
||||
{
|
||||
typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
|
||||
|
@ -46,7 +46,7 @@ is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __co
|
|||
}
|
||||
|
||||
template<class _ForwardIterator>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
|
||||
{
|
||||
return _VSTD::is_sorted_until(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void iter_swap(_ForwardIterator1 __a,
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 void iter_swap(_ForwardIterator1 __a,
|
||||
_ForwardIterator2 __b)
|
||||
// _NOEXCEPT_(_NOEXCEPT_(swap(*__a, *__b)))
|
||||
_NOEXCEPT_(_NOEXCEPT_(swap(*declval<_ForwardIterator1>(), *declval<_ForwardIterator2>()))) {
|
||||
|
|
|
@ -76,14 +76,14 @@ struct _IterOps<_ClassicAlgPolicy> {
|
|||
|
||||
// advance
|
||||
template <class _Iter, class _Distance>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
static void advance(_Iter& __iter, _Distance __count) {
|
||||
std::advance(__iter, __count);
|
||||
}
|
||||
|
||||
// distance
|
||||
template <class _Iter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
static typename iterator_traits<_Iter>::difference_type distance(_Iter __first, _Iter __last) {
|
||||
return std::distance(__first, __last);
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ struct _IterOps<_ClassicAlgPolicy> {
|
|||
using __move_t = decltype(std::move(*std::declval<_Iter&>()));
|
||||
|
||||
template <class _Iter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
static void __validate_iter_reference() {
|
||||
static_assert(is_same<__deref_t<_Iter>, typename iterator_traits<__uncvref_t<_Iter> >::reference>::value,
|
||||
"It looks like your iterator's `iterator_traits<It>::reference` does not match the return type of "
|
||||
|
@ -105,7 +105,7 @@ struct _IterOps<_ClassicAlgPolicy> {
|
|||
|
||||
// iter_move
|
||||
template <class _Iter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
|
||||
// If the result of dereferencing `_Iter` is a reference type, deduce the result of calling `std::move` on it. Note
|
||||
// that the C++03 mode doesn't support `decltype(auto)` as the return type.
|
||||
__enable_if_t<
|
||||
|
@ -118,7 +118,7 @@ struct _IterOps<_ClassicAlgPolicy> {
|
|||
}
|
||||
|
||||
template <class _Iter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
|
||||
// If the result of dereferencing `_Iter` is a value type, deduce the return value of this function to also be a
|
||||
// value -- otherwise, after `operator*` returns a temporary, this function would return a dangling reference to that
|
||||
// temporary. Note that the C++03 mode doesn't support `auto` as the return type.
|
||||
|
@ -133,20 +133,20 @@ struct _IterOps<_ClassicAlgPolicy> {
|
|||
|
||||
// iter_swap
|
||||
template <class _Iter1, class _Iter2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
static void iter_swap(_Iter1&& __a, _Iter2&& __b) {
|
||||
std::iter_swap(std::forward<_Iter1>(__a), std::forward<_Iter2>(__b));
|
||||
}
|
||||
|
||||
// next
|
||||
template <class _Iterator>
|
||||
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Iterator next(_Iterator, _Iterator __last) {
|
||||
return __last;
|
||||
}
|
||||
|
||||
template <class _Iter>
|
||||
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
__uncvref_t<_Iter> next(_Iter&& __it,
|
||||
typename iterator_traits<__uncvref_t<_Iter> >::difference_type __n = 1) {
|
||||
return std::next(std::forward<_Iter>(__it), __n);
|
||||
|
@ -154,14 +154,14 @@ struct _IterOps<_ClassicAlgPolicy> {
|
|||
|
||||
// prev
|
||||
template <class _Iter>
|
||||
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
__uncvref_t<_Iter> prev(_Iter&& __iter,
|
||||
typename iterator_traits<__uncvref_t<_Iter> >::difference_type __n = 1) {
|
||||
return std::prev(std::forward<_Iter>(__iter), __n);
|
||||
}
|
||||
|
||||
template <class _Iter>
|
||||
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
void __advance_to(_Iter& __first, _Iter __last) {
|
||||
__first = __last;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Compare, class _InputIterator1, class _InputIterator2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
__lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ __lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
|
|||
|
||||
template <class _InputIterator1, class _InputIterator2, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
|
||||
|
@ -48,7 +48,7 @@ lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
|
|||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2)
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Iter, class _Sent, class _Type, class _Proj, class _Comp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_Iter __lower_bound_impl(_Iter __first, _Sent __last, const _Type& __value, _Comp& __comp, _Proj& __proj) {
|
||||
auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
|
||||
|
||||
|
@ -48,7 +48,7 @@ _Iter __lower_bound_impl(_Iter __first, _Sent __last, const _Type& __value, _Com
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
|
||||
static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value,
|
||||
"The comparator has to be callable");
|
||||
|
@ -57,7 +57,7 @@ _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last,
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
|
||||
return std::lower_bound(__first, __last, __value,
|
||||
__less<typename iterator_traits<_ForwardIterator>::value_type, _Tp>());
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
|
||||
using _CompRef = typename __comp_ref_type<_Compare>::type;
|
||||
_CompRef __comp_ref = __comp;
|
||||
|
@ -40,13 +40,13 @@ void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator, class _Compare>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
|
||||
std::__make_heap<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
|
||||
std::make_heap(std::move(__first), std::move(__last),
|
||||
__less<typename iterator_traits<_RandomAccessIterator>::value_type>());
|
||||
|
|
|
@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
template <class _Tp, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Tp&
|
||||
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ max(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
|||
|
||||
template <class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Tp&
|
||||
max(const _Tp& __a, const _Tp& __b)
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ max(const _Tp& __a, const _Tp& __b)
|
|||
|
||||
template<class _Tp, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Tp
|
||||
max(initializer_list<_Tp> __t, _Compare __comp)
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ max(initializer_list<_Tp> __t, _Compare __comp)
|
|||
|
||||
template<class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Tp
|
||||
max(initializer_list<_Tp> __t)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Compare, class _ForwardIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
|
||||
__max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
||||
{
|
||||
static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
|
||||
|
@ -37,7 +37,7 @@ __max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
|
||||
max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
||||
{
|
||||
typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
|
||||
|
@ -46,7 +46,7 @@ max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
|||
|
||||
|
||||
template <class _ForwardIterator>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
|
||||
max_element(_ForwardIterator __first, _ForwardIterator __last)
|
||||
{
|
||||
return _VSTD::max_element(__first, __last,
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
__merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
|
||||
|
@ -46,7 +46,7 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
|
||||
|
@ -56,7 +56,7 @@ merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
|
||||
|
|
|
@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
template <class _Tp, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Tp&
|
||||
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ min(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
|||
|
||||
template <class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Tp&
|
||||
min(const _Tp& __a, const _Tp& __b)
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ min(const _Tp& __a, const _Tp& __b)
|
|||
|
||||
template<class _Tp, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Tp
|
||||
min(initializer_list<_Tp> __t, _Compare __comp)
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ min(initializer_list<_Tp> __t, _Compare __comp)
|
|||
|
||||
template<class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Tp
|
||||
min(initializer_list<_Tp> __t)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Comp, class _Iter, class _Sent, class _Proj>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Iter __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
|
||||
if (__first == __last)
|
||||
return __first;
|
||||
|
@ -39,14 +39,14 @@ _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
|
|||
}
|
||||
|
||||
template <class _Comp, class _Iter, class _Sent>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Iter __min_element(_Iter __first, _Sent __last, _Comp __comp) {
|
||||
auto __proj = __identity();
|
||||
return std::__min_element<_Comp>(std::move(__first), std::move(__last), __comp, __proj);
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
|
||||
min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
||||
{
|
||||
static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
|
||||
|
@ -59,7 +59,7 @@ min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
|||
}
|
||||
|
||||
template <class _ForwardIterator>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
|
||||
min_element(_ForwardIterator __first, _ForwardIterator __last)
|
||||
{
|
||||
return _VSTD::min_element(__first, __last,
|
||||
|
|
|
@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
template<class _Tp, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<const _Tp&, const _Tp&>
|
||||
minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
|
|||
|
||||
template<class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<const _Tp&, const _Tp&>
|
||||
minmax(const _Tp& __a, const _Tp& __b)
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ minmax(const _Tp& __a, const _Tp& __b)
|
|||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template<class _Tp, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Tp, _Tp> minmax(initializer_list<_Tp> __t, _Compare __comp) {
|
||||
static_assert(__is_callable<_Compare, _Tp, _Tp>::value, "The comparator has to be callable");
|
||||
__identity __proj;
|
||||
|
@ -55,7 +55,7 @@ pair<_Tp, _Tp> minmax(initializer_list<_Tp> __t, _Compare __comp) {
|
|||
|
||||
template<class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Tp, _Tp>
|
||||
minmax(initializer_list<_Tp> __t)
|
||||
{
|
||||
|
|
|
@ -32,14 +32,14 @@ public:
|
|||
_MinmaxElementLessFunc(_Comp& __comp, _Proj& __proj) : __comp_(__comp), __proj_(__proj) {}
|
||||
|
||||
template <class _Iter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool operator()(_Iter& __it1, _Iter& __it2) {
|
||||
return std::__invoke(__comp_, std::__invoke(__proj_, *__it1), std::__invoke(__proj_, *__it2));
|
||||
}
|
||||
};
|
||||
|
||||
template <class _Iter, class _Sent, class _Proj, class _Comp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Iter, _Iter> __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
|
||||
auto __less = _MinmaxElementLessFunc<_Comp, _Proj>(__comp, __proj);
|
||||
|
||||
|
@ -79,7 +79,7 @@ pair<_Iter, _Iter> __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __c
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_ForwardIterator, _ForwardIterator>
|
||||
minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
|
||||
static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
|
||||
|
@ -91,7 +91,7 @@ minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __com
|
|||
}
|
||||
|
||||
template <class _ForwardIterator>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last) {
|
||||
return std::minmax_element(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
|
||||
mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
|
||||
for (; __first1 != __last1; ++__first1, (void)++__first2)
|
||||
if (!__pred(*__first1, *__first2))
|
||||
|
@ -33,7 +33,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
|
|||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
|
||||
mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
|
||||
typedef typename iterator_traits<_InputIterator1>::value_type __v1;
|
||||
typedef typename iterator_traits<_InputIterator2>::value_type __v2;
|
||||
|
@ -43,7 +43,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
|
|||
#if _LIBCPP_STD_VER > 11
|
||||
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
|
||||
mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
|
||||
_BinaryPredicate __pred) {
|
||||
for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2)
|
||||
|
@ -54,7 +54,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
|
|||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
|
||||
mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
|
||||
typedef typename iterator_traits<_InputIterator1>::value_type __v1;
|
||||
typedef typename iterator_traits<_InputIterator2>::value_type __v2;
|
||||
|
|
|
@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
// move
|
||||
|
||||
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
pair<_InIter, _OutIter> __move_impl(_InIter __first, _Sent __last, _OutIter __result) {
|
||||
while (__first != __last) {
|
||||
*__result = _IterOps<_AlgPolicy>::__iter_move(__first);
|
||||
|
@ -43,7 +43,7 @@ template <class _AlgPolicy,
|
|||
class _OutType,
|
||||
class = __enable_if_t<is_same<typename remove_const<_InType>::type, _OutType>::value
|
||||
&& is_trivially_move_assignable<_OutType>::value> >
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_InType*, _OutType*> __move_impl(_InType* __first, _InType* __last, _OutType* __result) {
|
||||
if (__libcpp_is_constant_evaluated()
|
||||
// TODO: Remove this once GCC supports __builtin_memmove during constant evaluation
|
||||
|
@ -75,7 +75,7 @@ template <class _AlgPolicy,
|
|||
&& __is_cpp17_contiguous_iterator<_InIter>::value
|
||||
&& __is_cpp17_contiguous_iterator<_OutIter>::value
|
||||
&& is_trivially_move_assignable<__iter_value_type<_OutIter> >::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
pair<reverse_iterator<_InIter>, reverse_iterator<_OutIter> >
|
||||
__move_impl(reverse_iterator<_InIter> __first,
|
||||
reverse_iterator<_InIter> __last,
|
||||
|
@ -89,7 +89,7 @@ __move_impl(reverse_iterator<_InIter> __first,
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
__enable_if_t<is_copy_constructible<_InIter>::value
|
||||
&& is_copy_constructible<_Sent>::value
|
||||
&& is_copy_constructible<_OutIter>::value, pair<_InIter, _OutIter> >
|
||||
|
@ -100,7 +100,7 @@ __move(_InIter __first, _Sent __last, _OutIter __result) {
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
__enable_if_t<!is_copy_constructible<_InIter>::value
|
||||
|| !is_copy_constructible<_Sent>::value
|
||||
|| !is_copy_constructible<_OutIter>::value, pair<_InIter, _OutIter> >
|
||||
|
@ -109,7 +109,7 @@ __move(_InIter __first, _Sent __last, _OutIter __result) {
|
|||
}
|
||||
|
||||
template <class _InputIterator, class _OutputIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
|
||||
return std::__move<_ClassicAlgPolicy>(__first, __last, __result).second;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _InputIterator, class _OutputIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
_OutputIterator
|
||||
__move_backward_constexpr(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ __move_backward_constexpr(_InputIterator __first, _InputIterator __last, _Output
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _InputIterator, class _OutputIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
_OutputIterator
|
||||
__move_backward_impl(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ __move_backward_impl(_InputIterator __first, _InputIterator __last, _OutputItera
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _Tp, class _Up>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
typename enable_if
|
||||
<
|
||||
is_same<typename remove_const<_Tp>::type, _Up>::value &&
|
||||
|
@ -60,7 +60,7 @@ __move_backward_impl(_Tp* __first, _Tp* __last, _Up* __result)
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _BidirectionalIterator1, class _BidirectionalIterator2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_BidirectionalIterator2
|
||||
__move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
|
||||
_BidirectionalIterator2 __result)
|
||||
|
@ -76,7 +76,7 @@ __move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
|
|||
}
|
||||
|
||||
template <class _BidirectionalIterator1, class _BidirectionalIterator2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_BidirectionalIterator2
|
||||
move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
|
||||
_BidirectionalIterator2 __result)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, bool>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator, bool>
|
||||
__next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
|
||||
{
|
||||
using _Result = pair<_BidirectionalIterator, bool>;
|
||||
|
@ -56,7 +56,7 @@ __next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&&
|
|||
}
|
||||
|
||||
template <class _BidirectionalIterator, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last,
|
|||
}
|
||||
|
||||
template <class _BidirectionalIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _Predicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
|
||||
for (; __first != __last; ++__first)
|
||||
if (__pred(*__first))
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template<class _Compare, class _RandomAccessIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 bool
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
|
||||
__nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
|
||||
_RandomAccessIterator __m, _Compare __comp)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ __nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
|
||||
__nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp)
|
||||
{
|
||||
using _Ops = _IterOps<_AlgPolicy>;
|
||||
|
@ -223,7 +223,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void __nth_element_impl(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last,
|
||||
_Compare& __comp) {
|
||||
if (__nth == __last)
|
||||
|
@ -241,14 +241,14 @@ void __nth_element_impl(_RandomAccessIterator __first, _RandomAccessIterator __n
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator, class _Compare>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last,
|
||||
_Compare __comp) {
|
||||
std::__nth_element_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__nth), std::move(__last), __comp);
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last) {
|
||||
std::nth_element(std::move(__first), std::move(__nth), std::move(__last), __less<typename
|
||||
iterator_traits<_RandomAccessIterator>::value_type>());
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_RandomAccessIterator __partial_sort_impl(
|
||||
_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare&& __comp) {
|
||||
if (__first == __middle) {
|
||||
|
@ -55,7 +55,7 @@ _RandomAccessIterator __partial_sort_impl(
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_RandomAccessIterator __partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last,
|
||||
_Compare& __comp) {
|
||||
if (__first == __middle)
|
||||
|
@ -72,7 +72,7 @@ _RandomAccessIterator __partial_sort(_RandomAccessIterator __first, _RandomAcces
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
|
||||
_Compare __comp)
|
||||
|
@ -84,7 +84,7 @@ partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
template <class _AlgPolicy, class _Compare,
|
||||
class _InputIterator, class _Sentinel1, class _RandomAccessIterator, class _Sentinel2,
|
||||
class _Proj1, class _Proj2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator, _RandomAccessIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator, _RandomAccessIterator>
|
||||
__partial_sort_copy(_InputIterator __first, _Sentinel1 __last,
|
||||
_RandomAccessIterator __result_first, _Sentinel2 __result_last,
|
||||
_Compare&& __comp, _Proj1&& __proj1, _Proj2&& __proj2)
|
||||
|
@ -60,7 +60,7 @@ __partial_sort_copy(_InputIterator __first, _Sentinel1 __last,
|
|||
}
|
||||
|
||||
template <class _InputIterator, class _RandomAccessIterator, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_RandomAccessIterator
|
||||
partial_sort_copy(_InputIterator __first, _InputIterator __last,
|
||||
_RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp)
|
||||
|
@ -75,7 +75,7 @@ partial_sort_copy(_InputIterator __first, _InputIterator __last,
|
|||
}
|
||||
|
||||
template <class _InputIterator, class _RandomAccessIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_RandomAccessIterator
|
||||
partial_sort_copy(_InputIterator __first, _InputIterator __last,
|
||||
_RandomAccessIterator __result_first, _RandomAccessIterator __result_last)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Predicate, class _AlgPolicy, class _ForwardIterator, class _Sentinel>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
|
||||
__partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred, forward_iterator_tag)
|
||||
{
|
||||
while (true)
|
||||
|
@ -48,7 +48,7 @@ __partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred,
|
|||
}
|
||||
|
||||
template <class _Predicate, class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, _BidirectionalIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator, _BidirectionalIterator>
|
||||
__partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicate __pred,
|
||||
bidirectional_iterator_tag)
|
||||
{
|
||||
|
@ -76,7 +76,7 @@ __partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicat
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _ForwardIterator, class _Sentinel, class _Predicate, class _IterCategory>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
pair<_ForwardIterator, _ForwardIterator> __partition(
|
||||
_ForwardIterator __first, _Sentinel __last, _Predicate&& __pred, _IterCategory __iter_category) {
|
||||
return std::__partition_impl<__uncvref_t<_Predicate>&, _AlgPolicy>(
|
||||
|
@ -84,7 +84,7 @@ pair<_ForwardIterator, _ForwardIterator> __partition(
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Predicate>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_ForwardIterator
|
||||
partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
template <class _InputIterator, class _OutputIterator1,
|
||||
class _OutputIterator2, class _Predicate>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_OutputIterator1, _OutputIterator2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_OutputIterator1, _OutputIterator2>
|
||||
partition_copy(_InputIterator __first, _InputIterator __last,
|
||||
_OutputIterator1 __out_true, _OutputIterator2 __out_false,
|
||||
_Predicate __pred)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template<class _ForwardIterator, class _Predicate>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
|
||||
{
|
||||
typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp,
|
||||
typename iterator_traits<_RandomAccessIterator>::difference_type __len) {
|
||||
_LIBCPP_ASSERT(__len > 0, "The heap given to pop_heap must be non-empty");
|
||||
|
@ -53,7 +53,7 @@ void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Co
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator, class _Compare>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
|
||||
static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
|
||||
static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
|
||||
|
@ -63,7 +63,7 @@ void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
|
||||
std::pop_heap(std::move(__first), std::move(__last),
|
||||
__less<typename iterator_traits<_RandomAccessIterator>::value_type>());
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
pair<_BidirectionalIterator, bool>
|
||||
__prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ __prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&&
|
|||
}
|
||||
|
||||
template <class _BidirectionalIterator, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last,
|
|||
}
|
||||
|
||||
template <class _BidirectionalIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp,
|
||||
typename iterator_traits<_RandomAccessIterator>::difference_type __len) {
|
||||
using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
|
||||
|
@ -50,7 +50,7 @@ void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Com
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
void __push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) {
|
||||
using _CompRef = typename __comp_ref_type<_Compare>::type;
|
||||
typename iterator_traits<_RandomAccessIterator>::difference_type __len = __last - __first;
|
||||
|
@ -58,7 +58,7 @@ void __push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator, class _Compare>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
|
||||
static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
|
||||
static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
|
||||
|
@ -67,7 +67,7 @@ void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Com
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
|
||||
std::push_heap(std::move(__first), std::move(__last),
|
||||
__less<typename iterator_traits<_RandomAccessIterator>::value_type>());
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
|
||||
{
|
||||
__first = _VSTD::find(__first, __last, __value);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _OutputIterator, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _OutputIterator, class _Predicate>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _ForwardIterator, class _Predicate>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
|
||||
{
|
||||
__first = _VSTD::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, const _Tp& __new_value)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _OutputIterator, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
replace_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
|
||||
const _Tp& __old_value, const _Tp& __new_value)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _OutputIterator, class _Predicate, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
|
||||
_Predicate __pred, const _Tp& __new_value)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _ForwardIterator, class _Predicate, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
replace_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, const _Tp& __new_value)
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _BidirectionalIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
__reverse_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirectional_iterator_tag)
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ __reverse_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, bi
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _RandomAccessIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
__reverse_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag)
|
||||
{
|
||||
|
@ -46,14 +46,14 @@ __reverse_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, rand
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void __reverse(_BidirectionalIterator __first, _Sentinel __last) {
|
||||
using _IterCategory = typename _IterOps<_AlgPolicy>::template __iterator_category<_BidirectionalIterator>;
|
||||
std::__reverse_impl<_AlgPolicy>(std::move(__first), std::move(__last), _IterCategory());
|
||||
}
|
||||
|
||||
template <class _BidirectionalIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _BidirectionalIterator, class _OutputIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _ForwardIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
|
||||
__rotate_left(_ForwardIterator __first, _ForwardIterator __last)
|
||||
{
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
|
||||
|
@ -40,7 +40,7 @@ __rotate_left(_ForwardIterator __first, _ForwardIterator __last)
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _BidirectionalIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterator
|
||||
__rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
|
||||
{
|
||||
typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
|
||||
|
@ -54,7 +54,7 @@ __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _ForwardIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14 _ForwardIterator
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _ForwardIterator
|
||||
__rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
|
||||
{
|
||||
_ForwardIterator __i = __middle;
|
||||
|
@ -90,7 +90,7 @@ __rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIt
|
|||
|
||||
template<typename _Integral>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX14 _Integral
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX17 _Integral
|
||||
__algo_gcd(_Integral __x, _Integral __y)
|
||||
{
|
||||
do
|
||||
|
@ -103,7 +103,7 @@ __algo_gcd(_Integral __x, _Integral __y)
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, typename _RandomAccessIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14 _RandomAccessIterator
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _RandomAccessIterator
|
||||
__rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
|
||||
{
|
||||
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
|
||||
|
@ -140,7 +140,7 @@ __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
|
|||
|
||||
template <class _AlgPolicy, class _ForwardIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
|
||||
__rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
|
||||
_VSTD::forward_iterator_tag)
|
||||
{
|
||||
|
@ -155,7 +155,7 @@ __rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardItera
|
|||
|
||||
template <class _AlgPolicy, class _BidirectionalIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterator
|
||||
__rotate_impl(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last,
|
||||
bidirectional_iterator_tag)
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ __rotate_impl(_BidirectionalIterator __first, _BidirectionalIterator __middle, _
|
|||
|
||||
template <class _AlgPolicy, class _RandomAccessIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator
|
||||
__rotate_impl(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
|
||||
random_access_iterator_tag)
|
||||
{
|
||||
|
@ -189,7 +189,7 @@ __rotate_impl(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ra
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _Iterator, class _Sentinel>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Iterator, _Iterator>
|
||||
__rotate(_Iterator __first, _Iterator __middle, _Sentinel __last) {
|
||||
using _Ret = pair<_Iterator, _Iterator>;
|
||||
|
@ -209,7 +209,7 @@ __rotate(_Iterator __first, _Iterator __middle, _Sentinel __last) {
|
|||
|
||||
template <class _ForwardIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
|
||||
{
|
||||
return std::__rotate<_ClassicAlgPolicy>(
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _ForwardIterator, class _OutputIterator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result)
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ template <class _AlgPolicy,
|
|||
class _Pred,
|
||||
class _Proj1,
|
||||
class _Proj2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Iter1, _Iter1> __search_forward_impl(_Iter1 __first1, _Sent1 __last1,
|
||||
_Iter2 __first2, _Sent2 __last2,
|
||||
_Pred& __pred,
|
||||
|
@ -80,7 +80,7 @@ template <class _AlgPolicy,
|
|||
class _Proj2,
|
||||
class _DiffT1,
|
||||
class _DiffT2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Iter1, _Iter1> __search_random_access_impl(_Iter1 __first1, _Sent1 __last1,
|
||||
_Iter2 __first2, _Sent2 __last2,
|
||||
_Pred& __pred,
|
||||
|
@ -120,7 +120,7 @@ template <class _Iter1, class _Sent1,
|
|||
class _Pred,
|
||||
class _Proj1,
|
||||
class _Proj2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
|
||||
_Iter2 __first2, _Sent2 __last2,
|
||||
_Pred& __pred,
|
||||
|
@ -152,7 +152,7 @@ template <class _Iter1, class _Sent1,
|
|||
class _Pred,
|
||||
class _Proj1,
|
||||
class _Proj2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
|
||||
_Iter2 __first2, _Sent2 __last2,
|
||||
_Pred& __pred,
|
||||
|
@ -170,7 +170,7 @@ pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
|
|||
}
|
||||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
||||
_ForwardIterator2 __first2, _ForwardIterator2 __last2,
|
||||
_BinaryPredicate __pred) {
|
||||
|
@ -181,7 +181,7 @@ _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|||
}
|
||||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
||||
_ForwardIterator2 __first2, _ForwardIterator2 __last2) {
|
||||
using __v1 = typename iterator_traits<_ForwardIterator1>::value_type;
|
||||
|
@ -191,7 +191,7 @@ _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|||
|
||||
#if _LIBCPP_STD_VER > 14
|
||||
template <class _ForwardIterator, class _Searcher>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher& __s) {
|
||||
return __s(__f, __l).first;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Pred, class _Iter, class _Sent, class _SizeT, class _Type, class _Proj>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Iter, _Iter> __search_n_forward_impl(_Iter __first, _Sent __last,
|
||||
_SizeT __count,
|
||||
const _Type& __value,
|
||||
|
@ -72,7 +72,7 @@ pair<_Iter, _Iter> __search_n_forward_impl(_Iter __first, _Sent __last,
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _Pred, class _Iter, class _Sent, class _SizeT, class _Type, class _Proj, class _DiffT>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
std::pair<_Iter, _Iter> __search_n_random_access_impl(_Iter __first, _Sent __last,
|
||||
_SizeT __count,
|
||||
const _Type& __value,
|
||||
|
@ -123,7 +123,7 @@ template <class _Iter, class _Sent,
|
|||
class _Type,
|
||||
class _Pred,
|
||||
class _Proj>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Iter, _Iter> __search_n_impl(_Iter __first, _Sent __last,
|
||||
_DiffT __count,
|
||||
const _Type& __value,
|
||||
|
@ -143,7 +143,7 @@ template <class _Iter1, class _Sent1,
|
|||
class _Type,
|
||||
class _Pred,
|
||||
class _Proj>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
pair<_Iter1, _Iter1> __search_n_impl(_Iter1 __first, _Sent1 __last,
|
||||
_DiffT __count,
|
||||
const _Type& __value,
|
||||
|
@ -159,7 +159,7 @@ pair<_Iter1, _Iter1> __search_n_impl(_Iter1 __first, _Sent1 __last,
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last,
|
||||
_Size __count,
|
||||
const _Tp& __value,
|
||||
|
@ -171,7 +171,7 @@ _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last,
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Size, class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value) {
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type __v;
|
||||
return std::search_n(__first, __last, std::__convert_to_integral(__count), __value, __equal_to<__v, _Tp>());
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template < class _Comp, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<__uncvref_t<_InIter1>, __uncvref_t<_OutIter> >
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<__uncvref_t<_InIter1>, __uncvref_t<_OutIter> >
|
||||
__set_difference(
|
||||
_InIter1&& __first1, _Sent1&& __last1, _InIter2&& __first2, _Sent2&& __last2, _OutIter&& __result, _Comp&& __comp) {
|
||||
while (__first1 != __last1 && __first2 != __last2) {
|
||||
|
@ -46,7 +46,7 @@ __set_difference(
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_difference(
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_difference(
|
||||
_InputIterator1 __first1,
|
||||
_InputIterator1 __last1,
|
||||
_InputIterator2 __first2,
|
||||
|
@ -58,7 +58,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_d
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_difference(
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_difference(
|
||||
_InputIterator1 __first1,
|
||||
_InputIterator1 __last1,
|
||||
_InputIterator2 __first2,
|
||||
|
|
|
@ -30,13 +30,13 @@ struct __set_intersection_result {
|
|||
_OutIter __out_;
|
||||
|
||||
// need a constructor as C++03 aggregate init is hard
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__set_intersection_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
|
||||
: __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
|
||||
};
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_intersection_result<_InIter1, _InIter2, _OutIter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_intersection_result<_InIter1, _InIter2, _OutIter>
|
||||
__set_intersection(
|
||||
_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
|
||||
while (__first1 != __last1 && __first2 != __last2) {
|
||||
|
@ -59,7 +59,7 @@ __set_intersection(
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_intersection(
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_intersection(
|
||||
_InputIterator1 __first1,
|
||||
_InputIterator1 __last1,
|
||||
_InputIterator2 __first2,
|
||||
|
@ -78,7 +78,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_i
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_intersection(
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_intersection(
|
||||
_InputIterator1 __first1,
|
||||
_InputIterator1 __last1,
|
||||
_InputIterator2 __first2,
|
||||
|
|
|
@ -29,13 +29,13 @@ struct __set_symmetric_difference_result {
|
|||
_OutIter __out_;
|
||||
|
||||
// need a constructor as C++03 aggregate init is hard
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__set_symmetric_difference_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
|
||||
: __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
|
||||
};
|
||||
|
||||
template <class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_symmetric_difference_result<_InIter1, _InIter2, _OutIter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_symmetric_difference_result<_InIter1, _InIter2, _OutIter>
|
||||
__set_symmetric_difference(
|
||||
_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
|
||||
while (__first1 != __last1) {
|
||||
|
@ -64,7 +64,7 @@ __set_symmetric_difference(
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetric_difference(
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_symmetric_difference(
|
||||
_InputIterator1 __first1,
|
||||
_InputIterator1 __last1,
|
||||
_InputIterator2 __first2,
|
||||
|
@ -83,7 +83,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetri
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetric_difference(
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_symmetric_difference(
|
||||
_InputIterator1 __first1,
|
||||
_InputIterator1 __last1,
|
||||
_InputIterator2 __first2,
|
||||
|
|
|
@ -29,13 +29,13 @@ struct __set_union_result {
|
|||
_OutIter __out_;
|
||||
|
||||
// need a constructor as C++03 aggregate init is hard
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__set_union_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
|
||||
: __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
|
||||
};
|
||||
|
||||
template <class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_union_result<_InIter1, _InIter2, _OutIter> __set_union(
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_union_result<_InIter1, _InIter2, _OutIter> __set_union(
|
||||
_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
|
||||
for (; __first1 != __last1; ++__result) {
|
||||
if (__first2 == __last2) {
|
||||
|
@ -60,7 +60,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_union_result<_InIter1,
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
|
||||
_InputIterator1 __first1,
|
||||
_InputIterator1 __last1,
|
||||
_InputIterator2 __first2,
|
||||
|
@ -79,7 +79,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
|
||||
_InputIterator1 __first1,
|
||||
_InputIterator1 __last1,
|
||||
_InputIterator2 __first2,
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
|
||||
__sift_down(_RandomAccessIterator __first, _Compare&& __comp,
|
||||
typename iterator_traits<_RandomAccessIterator>::difference_type __len,
|
||||
_RandomAccessIterator __start)
|
||||
|
@ -78,7 +78,7 @@ __sift_down(_RandomAccessIterator __first, _Compare&& __comp,
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator
|
||||
__floyd_sift_down(_RandomAccessIterator __first, _Compare&& __comp,
|
||||
typename iterator_traits<_RandomAccessIterator>::difference_type __len)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ struct _WrapAlgPolicy {
|
|||
using _Comp = _CompT;
|
||||
_Comp& __comp;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_WrapAlgPolicy(_Comp& __c) : __comp(__c) {}
|
||||
};
|
||||
|
||||
|
@ -62,7 +62,7 @@ struct _UnwrapAlgPolicy {
|
|||
using _AlgPolicy = _ClassicAlgPolicy;
|
||||
using _Comp = _CompT;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
|
||||
_Comp __get_comp(_Comp __comp) { return __comp; }
|
||||
};
|
||||
|
||||
|
@ -73,7 +73,7 @@ struct _UnwrapAlgPolicy<_WrapAlgPolicy<_Ts...> > {
|
|||
using _AlgPolicy = typename _Wrapped::_AlgPolicy;
|
||||
using _Comp = typename _Wrapped::_Comp;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
|
||||
_Comp __get_comp(_Wrapped& __w) { return __w.__comp; }
|
||||
};
|
||||
|
||||
|
@ -81,7 +81,7 @@ struct _UnwrapAlgPolicy<_WrapAlgPolicy<_Ts...> > {
|
|||
|
||||
template <class _AlgPolicy, class _Compare, class _ForwardIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 unsigned __sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z,
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 unsigned __sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z,
|
||||
_Compare __c) {
|
||||
using _Ops = _IterOps<_AlgPolicy>;
|
||||
|
||||
|
@ -284,7 +284,7 @@ __sort5_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2,
|
|||
// Assumes size > 0
|
||||
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 void __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 void __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
|
||||
_Compare __comp) {
|
||||
_BidirectionalIterator __lm1 = __last;
|
||||
for (--__lm1; __first != __lm1; ++__first) {
|
||||
|
@ -678,7 +678,7 @@ extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<long do
|
|||
extern template _LIBCPP_FUNC_VIS unsigned __sort5<__less<long double>&, long double*>(long double*, long double*, long double*, long double*, long double*, __less<long double>&);
|
||||
|
||||
template <class _AlgPolicy, class _RandomAccessIterator, class _Comp>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void __sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
|
||||
std::__debug_randomize_range<_AlgPolicy>(__first, __last);
|
||||
|
||||
|
@ -695,13 +695,13 @@ void __sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator, class _Comp>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
|
||||
std::__sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) {
|
||||
std::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
|
||||
using _CompRef = typename __comp_ref_type<_Compare>::type;
|
||||
_CompRef __comp_ref = __comp;
|
||||
|
@ -36,7 +36,7 @@ void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator, class _Compare>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
|
||||
static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
|
||||
static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
|
||||
|
@ -45,7 +45,7 @@ void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Com
|
|||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
|
||||
std::sort_heap(std::move(__first), std::move(__last),
|
||||
__less<typename iterator_traits<_RandomAccessIterator>::value_type>());
|
||||
|
|
|
@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
// 2+2 iterators: the shorter size will be used.
|
||||
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _Sentinel2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
pair<_ForwardIterator1, _ForwardIterator2>
|
||||
__swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2, _Sentinel2 __last2) {
|
||||
while (__first1 != __last1 && __first2 != __last2) {
|
||||
|
@ -36,7 +36,7 @@ __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2
|
|||
|
||||
// 2+1 iterators: size2 >= size1.
|
||||
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
pair<_ForwardIterator1, _ForwardIterator2>
|
||||
__swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2) {
|
||||
while (__first1 != __last1) {
|
||||
|
@ -49,7 +49,7 @@ __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2
|
|||
}
|
||||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator2
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator2
|
||||
swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) {
|
||||
return std::__swap_ranges<_ClassicAlgPolicy>(
|
||||
std::move(__first1), std::move(__last1), std::move(__first2)).second;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _InputIterator, class _OutputIterator, class _UnaryOperation>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __op)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ transform(_InputIterator __first, _InputIterator __last, _OutputIterator __resul
|
|||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _BinaryOperation>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
transform(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2,
|
||||
_OutputIterator __result, _BinaryOperation __binary_op)
|
||||
|
|
|
@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
// unique
|
||||
|
||||
template <class _AlgPolicy, class _Iter, class _Sent, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 std::pair<_Iter, _Iter>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 std::pair<_Iter, _Iter>
|
||||
__unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
|
||||
__first = std::__adjacent_find(__first, __last, __pred);
|
||||
if (__first != __last) {
|
||||
|
@ -43,13 +43,13 @@ __unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
|
||||
return std::__unique<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __pred).first;
|
||||
}
|
||||
|
||||
template <class _ForwardIterator>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
unique(_ForwardIterator __first, _ForwardIterator __last) {
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type __v;
|
||||
return std::unique(__first, __last, __equal_to<__v>());
|
||||
|
|
|
@ -34,7 +34,7 @@ struct __read_from_tmp_value_tag {};
|
|||
} // namespace __unique_copy_tags
|
||||
|
||||
template <class _AlgPolicy, class _BinaryPredicate, class _InputIterator, class _Sent, class _OutputIterator>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _OutputIterator>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _OutputIterator>
|
||||
__unique_copy(_InputIterator __first,
|
||||
_Sent __last,
|
||||
_OutputIterator __result,
|
||||
|
@ -56,7 +56,7 @@ __unique_copy(_InputIterator __first,
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _BinaryPredicate, class _ForwardIterator, class _Sent, class _OutputIterator>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _OutputIterator>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _OutputIterator>
|
||||
__unique_copy(_ForwardIterator __first,
|
||||
_Sent __last,
|
||||
_OutputIterator __result,
|
||||
|
@ -78,7 +78,7 @@ __unique_copy(_ForwardIterator __first,
|
|||
}
|
||||
|
||||
template <class _AlgPolicy, class _BinaryPredicate, class _InputIterator, class _Sent, class _InputAndOutputIterator>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _InputAndOutputIterator>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _InputAndOutputIterator>
|
||||
__unique_copy(_InputIterator __first,
|
||||
_Sent __last,
|
||||
_InputAndOutputIterator __result,
|
||||
|
@ -95,7 +95,7 @@ __unique_copy(_InputIterator __first,
|
|||
}
|
||||
|
||||
template <class _InputIterator, class _OutputIterator, class _BinaryPredicate>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
|
||||
unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __pred) {
|
||||
using __algo_tag = typename conditional<
|
||||
is_base_of<forward_iterator_tag, typename iterator_traits<_InputIterator>::iterator_category>::value,
|
||||
|
@ -112,7 +112,7 @@ unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __res
|
|||
}
|
||||
|
||||
template <class _InputIterator, class _OutputIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
|
||||
unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
|
||||
typedef typename iterator_traits<_InputIterator>::value_type __v;
|
||||
return std::unique_copy(std::move(__first), std::move(__last), std::move(__result), __equal_to<__v>());
|
||||
|
|
|
@ -57,7 +57,7 @@ struct __unwrap_iter_impl<_Iter, true> {
|
|||
template<class _Iter,
|
||||
class _Impl = __unwrap_iter_impl<_Iter>,
|
||||
__enable_if_t<is_copy_constructible<_Iter>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
decltype(_Impl::__unwrap(std::declval<_Iter>())) __unwrap_iter(_Iter __i) _NOEXCEPT {
|
||||
return _Impl::__unwrap(__i);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter
|
||||
__upper_bound(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) {
|
||||
auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
|
||||
while (__len != 0) {
|
||||
|
@ -45,7 +45,7 @@ __upper_bound(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
|
||||
static_assert(is_copy_constructible<_ForwardIterator>::value,
|
||||
"Iterator has to be copy constructible");
|
||||
|
@ -54,7 +54,7 @@ upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
|
|||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
|
||||
return std::upper_bound(
|
||||
std::move(__first),
|
||||
|
|
|
@ -54,15 +54,15 @@ class __bit_reference
|
|||
friend class __bit_const_reference<_Cp>;
|
||||
friend class __bit_iterator<_Cp, false>;
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bit_reference(const __bit_reference&) = default;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 operator bool() const _NOEXCEPT
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 operator bool() const _NOEXCEPT
|
||||
{return static_cast<bool>(*__seg_ & __mask_);}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool operator ~() const _NOEXCEPT
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool operator ~() const _NOEXCEPT
|
||||
{return !static_cast<bool>(*this);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bit_reference& operator=(bool __x) _NOEXCEPT
|
||||
{
|
||||
if (__x)
|
||||
|
@ -82,15 +82,15 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bit_reference& operator=(const __bit_reference& __x) _NOEXCEPT
|
||||
{return operator=(static_cast<bool>(__x));}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void flip() _NOEXCEPT {*__seg_ ^= __mask_;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false> operator&() const _NOEXCEPT
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 void flip() _NOEXCEPT {*__seg_ ^= __mask_;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, false> operator&() const _NOEXCEPT
|
||||
{return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
|
||||
private:
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
explicit __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
|
||||
: __seg_(__s), __mask_(__m) {}
|
||||
};
|
||||
|
@ -101,7 +101,7 @@ class __bit_reference<_Cp, false>
|
|||
};
|
||||
|
||||
template <class _Cp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT
|
|||
}
|
||||
|
||||
template <class _Cp, class _Dp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT
|
|||
}
|
||||
|
||||
template <class _Cp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT
|
|||
}
|
||||
|
||||
template <class _Cp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT
|
||||
{
|
||||
|
@ -155,14 +155,14 @@ public:
|
|||
_LIBCPP_INLINE_VISIBILITY
|
||||
__bit_const_reference(const __bit_const_reference&) = default;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT
|
||||
: __seg_(__x.__seg_), __mask_(__x.__mask_) {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator bool() const _NOEXCEPT
|
||||
{return static_cast<bool>(*__seg_ & __mask_);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, true> operator&() const _NOEXCEPT
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, true> operator&() const _NOEXCEPT
|
||||
{return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
|
||||
private:
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
|
@ -176,7 +176,7 @@ private:
|
|||
// find
|
||||
|
||||
template <class _Cp, bool _IsConst>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
|
||||
__find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
|
||||
{
|
||||
typedef __bit_iterator<_Cp, _IsConst> _It;
|
||||
|
@ -212,7 +212,7 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
|
|||
}
|
||||
|
||||
template <class _Cp, bool _IsConst>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
|
||||
__find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
|
||||
{
|
||||
typedef __bit_iterator<_Cp, _IsConst> _It;
|
||||
|
@ -251,7 +251,7 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
|
|||
}
|
||||
|
||||
template <class _Cp, bool _IsConst, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bit_iterator<_Cp, _IsConst>
|
||||
find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value)
|
||||
{
|
||||
|
@ -263,7 +263,7 @@ find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last
|
|||
// count
|
||||
|
||||
template <class _Cp, bool _IsConst>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX20 typename __bit_iterator<_Cp, _IsConst>::difference_type
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 typename __bit_iterator<_Cp, _IsConst>::difference_type
|
||||
__count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
|
||||
{
|
||||
typedef __bit_iterator<_Cp, _IsConst> _It;
|
||||
|
@ -337,7 +337,7 @@ count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __las
|
|||
// fill_n
|
||||
|
||||
template <class _Cp>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
|
||||
__fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
|
||||
{
|
||||
typedef __bit_iterator<_Cp, false> _It;
|
||||
|
@ -367,7 +367,7 @@ __fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
|
|||
}
|
||||
|
||||
template <class _Cp>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
|
||||
__fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
|
||||
{
|
||||
typedef __bit_iterator<_Cp, false> _It;
|
||||
|
@ -398,7 +398,7 @@ __fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
|
|||
}
|
||||
|
||||
template <class _Cp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value)
|
||||
{
|
||||
|
@ -414,7 +414,7 @@ fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __v
|
|||
// fill
|
||||
|
||||
template <class _Cp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value)
|
||||
{
|
||||
|
@ -424,7 +424,7 @@ fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool
|
|||
// copy
|
||||
|
||||
template <class _Cp, bool _IsConst>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
|
||||
__copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
|
||||
__bit_iterator<_Cp, false> __result)
|
||||
{
|
||||
|
@ -471,7 +471,7 @@ __copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsCon
|
|||
}
|
||||
|
||||
template <class _Cp, bool _IsConst>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
|
||||
__copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
|
||||
__bit_iterator<_Cp, false> __result)
|
||||
{
|
||||
|
@ -549,7 +549,7 @@ __copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsC
|
|||
}
|
||||
|
||||
template <class _Cp, bool _IsConst>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bit_iterator<_Cp, false>
|
||||
copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result)
|
||||
{
|
||||
|
@ -561,7 +561,7 @@ copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last
|
|||
// copy_backward
|
||||
|
||||
template <class _Cp, bool _IsConst>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
|
||||
__copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
|
||||
__bit_iterator<_Cp, false> __result)
|
||||
{
|
||||
|
@ -608,7 +608,7 @@ __copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_C
|
|||
}
|
||||
|
||||
template <class _Cp, bool _IsConst>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
|
||||
__copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
|
||||
__bit_iterator<_Cp, false> __result)
|
||||
{
|
||||
|
@ -694,7 +694,7 @@ __copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<
|
|||
}
|
||||
|
||||
template <class _Cp, bool _IsConst>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bit_iterator<_Cp, false>
|
||||
copy_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result)
|
||||
{
|
||||
|
@ -901,19 +901,19 @@ struct __bit_array
|
|||
difference_type __size_;
|
||||
__storage_type __word_[_Np];
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 static difference_type capacity()
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 static difference_type capacity()
|
||||
{return static_cast<difference_type>(_Np * __bits_per_word);}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit __bit_array(difference_type __s) : __size_(__s) {
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bit_array(difference_type __s) : __size_(__s) {
|
||||
if (__libcpp_is_constant_evaluated()) {
|
||||
for (size_t __i = 0; __i != __bit_array<_Cp>::_Np; ++__i)
|
||||
std::__construct_at(__word_ + __i, 0);
|
||||
}
|
||||
}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator begin()
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator begin()
|
||||
{
|
||||
return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]), 0);
|
||||
}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator end()
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator end()
|
||||
{
|
||||
return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]) + __size_ / __bits_per_word,
|
||||
static_cast<unsigned>(__size_ % __bits_per_word));
|
||||
|
@ -921,7 +921,7 @@ struct __bit_array
|
|||
};
|
||||
|
||||
template <class _Cp>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
|
||||
rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle, __bit_iterator<_Cp, false> __last)
|
||||
{
|
||||
typedef __bit_iterator<_Cp, false> _I1;
|
||||
|
@ -972,7 +972,7 @@ rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle,
|
|||
// equal
|
||||
|
||||
template <class _Cp, bool _IC1, bool _IC2>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool
|
||||
__equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1,
|
||||
__bit_iterator<_Cp, _IC2> __first2)
|
||||
{
|
||||
|
@ -1054,7 +1054,7 @@ __equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1>
|
|||
}
|
||||
|
||||
template <class _Cp, bool _IC1, bool _IC2>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool
|
||||
__equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1,
|
||||
__bit_iterator<_Cp, _IC2> __first2)
|
||||
{
|
||||
|
@ -1097,7 +1097,7 @@ __equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __
|
|||
}
|
||||
|
||||
template <class _Cp, bool _IC1, bool _IC2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
equal(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2)
|
||||
{
|
||||
|
@ -1131,7 +1131,7 @@ private:
|
|||
unsigned __ctz_;
|
||||
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator() _NOEXCEPT
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator() _NOEXCEPT
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
: __seg_(nullptr), __ctz_(0)
|
||||
#endif
|
||||
|
@ -1142,7 +1142,7 @@ public:
|
|||
// When _IsConst=true, this is a converting constructor;
|
||||
// the copy and move constructors are implicitly generated
|
||||
// and trivial.
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT
|
||||
: __seg_(__it.__seg_), __ctz_(__it.__ctz_) {}
|
||||
|
||||
|
@ -1151,19 +1151,19 @@ public:
|
|||
// the implicit generation of a defaulted one is deprecated.
|
||||
// When _IsConst=true, the assignment operators are
|
||||
// implicitly generated and trivial.
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bit_iterator& operator=(const _If<_IsConst, struct __private_nat, __bit_iterator>& __it) {
|
||||
__seg_ = __it.__seg_;
|
||||
__ctz_ = __it.__ctz_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator*() const _NOEXCEPT {
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator*() const _NOEXCEPT {
|
||||
return typename conditional<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >
|
||||
::type(__seg_, __storage_type(1) << __ctz_);
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator++()
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator++()
|
||||
{
|
||||
if (__ctz_ != __bits_per_word-1)
|
||||
++__ctz_;
|
||||
|
@ -1175,14 +1175,14 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator++(int)
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator++(int)
|
||||
{
|
||||
__bit_iterator __tmp = *this;
|
||||
++(*this);
|
||||
return __tmp;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator--()
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator--()
|
||||
{
|
||||
if (__ctz_ != 0)
|
||||
--__ctz_;
|
||||
|
@ -1194,14 +1194,14 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator--(int)
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator--(int)
|
||||
{
|
||||
__bit_iterator __tmp = *this;
|
||||
--(*this);
|
||||
return __tmp;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator+=(difference_type __n)
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator+=(difference_type __n)
|
||||
{
|
||||
if (__n >= 0)
|
||||
__seg_ += (__n + __ctz_) / __bits_per_word;
|
||||
|
@ -1213,54 +1213,54 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator-=(difference_type __n)
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator-=(difference_type __n)
|
||||
{
|
||||
return *this += -__n;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator+(difference_type __n) const
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator+(difference_type __n) const
|
||||
{
|
||||
__bit_iterator __t(*this);
|
||||
__t += __n;
|
||||
return __t;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator-(difference_type __n) const
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator-(difference_type __n) const
|
||||
{
|
||||
__bit_iterator __t(*this);
|
||||
__t -= __n;
|
||||
return __t;
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend __bit_iterator operator+(difference_type __n, const __bit_iterator& __it) {return __it + __n;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend difference_type operator-(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
{return (__x.__seg_ - __y.__seg_) * __bits_per_word + __x.__ctz_ - __y.__ctz_;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator[](difference_type __n) const {return *(*this + __n);}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator[](difference_type __n) const {return *(*this + __n);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator==(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator==(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
{return __x.__seg_ == __y.__seg_ && __x.__ctz_ == __y.__ctz_;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator!=(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator!=(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
{return !(__x == __y);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator<(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator<(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
{return __x.__seg_ < __y.__seg_ || (__x.__seg_ == __y.__seg_ && __x.__ctz_ < __y.__ctz_);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator>(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator>(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
{return __y < __x;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator<=(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator<=(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
{return !(__y < __x);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator>=(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator>=(const __bit_iterator& __x, const __bit_iterator& __y)
|
||||
{return !(__x < __y);}
|
||||
|
||||
private:
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
explicit __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT
|
||||
: __seg_(__s), __ctz_(__ctz) {}
|
||||
|
||||
|
@ -1271,40 +1271,40 @@ private:
|
|||
friend class __bit_iterator<_Cp, true>;
|
||||
template <class _Dp> friend struct __bit_array;
|
||||
template <class _Dp>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend void __fill_n_false(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n);
|
||||
|
||||
template <class _Dp>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend void __fill_n_true(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n);
|
||||
|
||||
template <class _Dp, bool _IC>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend __bit_iterator<_Dp, false> __copy_aligned(__bit_iterator<_Dp, _IC> __first,
|
||||
__bit_iterator<_Dp, _IC> __last,
|
||||
__bit_iterator<_Dp, false> __result);
|
||||
template <class _Dp, bool _IC>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend __bit_iterator<_Dp, false> __copy_unaligned(__bit_iterator<_Dp, _IC> __first,
|
||||
__bit_iterator<_Dp, _IC> __last,
|
||||
__bit_iterator<_Dp, false> __result);
|
||||
template <class _Dp, bool _IC>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend __bit_iterator<_Dp, false> copy(__bit_iterator<_Dp, _IC> __first,
|
||||
__bit_iterator<_Dp, _IC> __last,
|
||||
__bit_iterator<_Dp, false> __result);
|
||||
template <class _Dp, bool _IC>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend __bit_iterator<_Dp, false> __copy_backward_aligned(__bit_iterator<_Dp, _IC> __first,
|
||||
__bit_iterator<_Dp, _IC> __last,
|
||||
__bit_iterator<_Dp, false> __result);
|
||||
template <class _Dp, bool _IC>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend __bit_iterator<_Dp, false> __copy_backward_unaligned(__bit_iterator<_Dp, _IC> __first,
|
||||
__bit_iterator<_Dp, _IC> __last,
|
||||
__bit_iterator<_Dp, false> __result);
|
||||
template <class _Dp, bool _IC>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend __bit_iterator<_Dp, false> copy_backward(__bit_iterator<_Dp, _IC> __first,
|
||||
__bit_iterator<_Dp, _IC> __last,
|
||||
__bit_iterator<_Dp, false> __result);
|
||||
|
@ -1318,33 +1318,33 @@ private:
|
|||
__bit_iterator<__C1, false>,
|
||||
__bit_iterator<__C2, false>);
|
||||
template <class _Dp>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend __bit_iterator<_Dp, false> rotate(__bit_iterator<_Dp, false>,
|
||||
__bit_iterator<_Dp, false>,
|
||||
__bit_iterator<_Dp, false>);
|
||||
template <class _Dp, bool _IC1, bool _IC2>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend bool __equal_aligned(__bit_iterator<_Dp, _IC1>,
|
||||
__bit_iterator<_Dp, _IC1>,
|
||||
__bit_iterator<_Dp, _IC2>);
|
||||
template <class _Dp, bool _IC1, bool _IC2>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend bool __equal_unaligned(__bit_iterator<_Dp, _IC1>,
|
||||
__bit_iterator<_Dp, _IC1>,
|
||||
__bit_iterator<_Dp, _IC2>);
|
||||
template <class _Dp, bool _IC1, bool _IC2>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend bool equal(__bit_iterator<_Dp, _IC1>,
|
||||
__bit_iterator<_Dp, _IC1>,
|
||||
__bit_iterator<_Dp, _IC2>);
|
||||
template <class _Dp, bool _IC>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend __bit_iterator<_Dp, _IC> __find_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
|
||||
template <class _Dp, bool _IC>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
friend __bit_iterator<_Dp, _IC> __find_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
|
||||
template <class _Dp, bool _IC> friend typename __bit_iterator<_Dp, _IC>::difference_type
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX20
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
|
||||
__count_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
|
||||
template <class _Dp, bool _IC> friend typename __bit_iterator<_Dp, _IC>::difference_type
|
||||
__count_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
|
||||
|
|
|
@ -52,19 +52,19 @@ operator^(chars_format __x, chars_format __y) {
|
|||
_VSTD::__to_underlying(__y));
|
||||
}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 chars_format&
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 chars_format&
|
||||
operator&=(chars_format& __x, chars_format __y) {
|
||||
__x = __x & __y;
|
||||
return __x;
|
||||
}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 chars_format&
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 chars_format&
|
||||
operator|=(chars_format& __x, chars_format __y) {
|
||||
__x = __x | __y;
|
||||
return __x;
|
||||
}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 chars_format&
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 chars_format&
|
||||
operator^=(chars_format& __x, chars_format __y) {
|
||||
__x = __x ^ __y;
|
||||
return __x;
|
||||
|
|
|
@ -278,18 +278,18 @@ public:
|
|||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator+() const {return typename common_type<duration>::type(*this);}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator-() const {return typename common_type<duration>::type(-__rep_);}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator++() {++__rep_; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration operator++(int) {return duration(__rep_++);}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator--() {--__rep_; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration operator--(int) {return duration(__rep_--);}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator++() {++__rep_; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration operator++(int) {return duration(__rep_++);}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator--() {--__rep_; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration operator--(int) {return duration(__rep_--);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator*=(const rep& __rhs) {__rep_ *= __rhs; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator/=(const rep& __rhs) {__rep_ /= __rhs; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const rep& __rhs) {__rep_ %= __rhs; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const duration& __rhs) {__rep_ %= __rhs.count(); return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator*=(const rep& __rhs) {__rep_ *= __rhs; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator/=(const rep& __rhs) {__rep_ /= __rhs; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator%=(const rep& __rhs) {__rep_ %= __rhs; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator%=(const duration& __rhs) {__rep_ %= __rhs.count(); return *this;}
|
||||
|
||||
// special values
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ struct _FilesystemClock {
|
|||
typedef chrono::time_point<_FilesystemClock> time_point;
|
||||
|
||||
_LIBCPP_EXPORTED_FROM_ABI
|
||||
static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
|
||||
static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = false;
|
||||
|
||||
_LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_FUNC_VIS static time_point now() noexcept;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
typedef duration::rep rep;
|
||||
typedef duration::period period;
|
||||
typedef chrono::time_point<steady_clock, duration> time_point;
|
||||
static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = true;
|
||||
static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = true;
|
||||
|
||||
static time_point now() _NOEXCEPT;
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
typedef duration::rep rep;
|
||||
typedef duration::period period;
|
||||
typedef chrono::time_point<system_clock> time_point;
|
||||
static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
|
||||
static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = false;
|
||||
|
||||
static time_point now() _NOEXCEPT;
|
||||
static time_t to_time_t (const time_point& __t) _NOEXCEPT;
|
||||
|
|
|
@ -41,12 +41,12 @@ private:
|
|||
duration __d_;
|
||||
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 time_point() : __d_(duration::zero()) {}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit time_point(const duration& __d) : __d_(__d) {}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 time_point() : __d_(duration::zero()) {}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit time_point(const duration& __d) : __d_(__d) {}
|
||||
|
||||
// conversions
|
||||
template <class _Duration2>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
time_point(const time_point<clock, _Duration2>& __t,
|
||||
typename enable_if
|
||||
<
|
||||
|
@ -56,12 +56,12 @@ public:
|
|||
|
||||
// observer
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 duration time_since_epoch() const {return __d_;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 duration time_since_epoch() const {return __d_;}
|
||||
|
||||
// arithmetic
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 time_point& operator+=(const duration& __d) {__d_ += __d; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 time_point& operator+=(const duration& __d) {__d_ += __d; return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;}
|
||||
|
||||
// special values
|
||||
|
||||
|
@ -81,7 +81,7 @@ struct _LIBCPP_TEMPLATE_VIS common_type<chrono::time_point<_Clock, _Duration1>,
|
|||
namespace chrono {
|
||||
|
||||
template <class _ToDuration, class _Clock, class _Duration>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
time_point<_Clock, _ToDuration>
|
||||
time_point_cast(const time_point<_Clock, _Duration>& __t)
|
||||
{
|
||||
|
@ -141,7 +141,7 @@ abs(duration<_Rep, _Period> __d)
|
|||
// time_point ==
|
||||
|
||||
template <class _Clock, class _Duration1, class _Duration2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool
|
||||
operator==(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
|
||||
{
|
||||
|
@ -151,7 +151,7 @@ operator==(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
|
|||
// time_point !=
|
||||
|
||||
template <class _Clock, class _Duration1, class _Duration2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool
|
||||
operator!=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
|
||||
{
|
||||
|
@ -161,7 +161,7 @@ operator!=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
|
|||
// time_point <
|
||||
|
||||
template <class _Clock, class _Duration1, class _Duration2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool
|
||||
operator<(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ operator<(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
|
|||
// time_point >
|
||||
|
||||
template <class _Clock, class _Duration1, class _Duration2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool
|
||||
operator>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
|
||||
{
|
||||
|
@ -181,7 +181,7 @@ operator>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
|
|||
// time_point <=
|
||||
|
||||
template <class _Clock, class _Duration1, class _Duration2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool
|
||||
operator<=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
|
||||
{
|
||||
|
@ -191,7 +191,7 @@ operator<=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
|
|||
// time_point >=
|
||||
|
||||
template <class _Clock, class _Duration1, class _Duration2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
bool
|
||||
operator>=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
|
||||
{
|
||||
|
@ -201,7 +201,7 @@ operator>=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
|
|||
// time_point operator+(time_point x, duration y);
|
||||
|
||||
template <class _Clock, class _Duration1, class _Rep2, class _Period2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
|
||||
operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
|
||||
{
|
||||
|
@ -212,7 +212,7 @@ operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Pe
|
|||
// time_point operator+(duration x, time_point y);
|
||||
|
||||
template <class _Rep1, class _Period1, class _Clock, class _Duration2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
time_point<_Clock, typename common_type<duration<_Rep1, _Period1>, _Duration2>::type>
|
||||
operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
|
||||
{
|
||||
|
@ -222,7 +222,7 @@ operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Dura
|
|||
// time_point operator-(time_point x, duration y);
|
||||
|
||||
template <class _Clock, class _Duration1, class _Rep2, class _Period2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
|
||||
operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
|
||||
{
|
||||
|
@ -233,7 +233,7 @@ operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Pe
|
|||
// duration operator-(time_point x, time_point y);
|
||||
|
||||
template <class _Clock, class _Duration1, class _Duration2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
typename common_type<_Duration1, _Duration2>::type
|
||||
operator-(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
|
||||
{
|
||||
|
|
|
@ -824,27 +824,27 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
|
|||
# endif
|
||||
|
||||
# if _LIBCPP_STD_VER > 11
|
||||
# define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
|
||||
# define _LIBCPP_CONSTEXPR_SINCE_CXX14 constexpr
|
||||
# else
|
||||
# define _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
# define _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
# endif
|
||||
|
||||
# if _LIBCPP_STD_VER > 14
|
||||
# define _LIBCPP_CONSTEXPR_AFTER_CXX14 constexpr
|
||||
# define _LIBCPP_CONSTEXPR_SINCE_CXX17 constexpr
|
||||
# else
|
||||
# define _LIBCPP_CONSTEXPR_AFTER_CXX14
|
||||
# define _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
# endif
|
||||
|
||||
# if _LIBCPP_STD_VER > 17
|
||||
# define _LIBCPP_CONSTEXPR_AFTER_CXX17 constexpr
|
||||
# define _LIBCPP_CONSTEXPR_SINCE_CXX20 constexpr
|
||||
# else
|
||||
# define _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
# define _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
# endif
|
||||
|
||||
# if _LIBCPP_STD_VER > 20
|
||||
# define _LIBCPP_CONSTEXPR_AFTER_CXX20 constexpr
|
||||
# define _LIBCPP_CONSTEXPR_SINCE_CXX23 constexpr
|
||||
# else
|
||||
# define _LIBCPP_CONSTEXPR_AFTER_CXX20
|
||||
# define _LIBCPP_CONSTEXPR_SINCE_CXX23
|
||||
# endif
|
||||
|
||||
# if __has_cpp_attribute(nodiscard)
|
||||
|
|
|
@ -212,7 +212,7 @@ _LIBCPP_END_NAMESPACE_STD
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_insert_c(_Tp* __c) {
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 inline void __debug_db_insert_c(_Tp* __c) {
|
||||
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
|
||||
if (!__libcpp_is_constant_evaluated())
|
||||
__get_db()->__insert_c(__c);
|
||||
|
@ -222,7 +222,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_inser
|
|||
}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_insert_i(_Tp* __i) {
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 inline void __debug_db_insert_i(_Tp* __i) {
|
||||
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
|
||||
if (!__libcpp_is_constant_evaluated())
|
||||
__get_db()->__insert_i(__i);
|
||||
|
@ -232,7 +232,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_inser
|
|||
}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_erase_c(_Tp* __c) {
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 inline void __debug_db_erase_c(_Tp* __c) {
|
||||
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
|
||||
if (!__libcpp_is_constant_evaluated())
|
||||
__get_db()->__erase_c(__c);
|
||||
|
@ -242,7 +242,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_erase
|
|||
}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_swap(_Tp* __lhs, _Tp* __rhs) {
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 inline void __debug_db_swap(_Tp* __lhs, _Tp* __rhs) {
|
||||
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
|
||||
if (!__libcpp_is_constant_evaluated())
|
||||
__get_db()->swap(__lhs, __rhs);
|
||||
|
@ -253,7 +253,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_swap(
|
|||
}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_invalidate_all(_Tp* __c) {
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 inline void __debug_db_invalidate_all(_Tp* __c) {
|
||||
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
|
||||
if (!__libcpp_is_constant_evaluated())
|
||||
__get_db()->__invalidate_all(__c);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _AlgPolicy, class _Iterator, class _Sentinel>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
void __debug_randomize_range(_Iterator __first, _Sentinel __last) {
|
||||
#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
|
||||
# ifdef _LIBCPP_CXX03_LANG
|
||||
|
|
|
@ -29,17 +29,17 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 binary_negate
|
|||
{
|
||||
_Predicate __pred_;
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_INLINE_VISIBILITY explicit _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
binary_negate(const _Predicate& __pred) : __pred_(__pred) {}
|
||||
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
|
||||
bool operator()(const typename _Predicate::first_argument_type& __x,
|
||||
const typename _Predicate::second_argument_type& __y) const
|
||||
{return !__pred_(__x, __y);}
|
||||
};
|
||||
|
||||
template <class _Predicate>
|
||||
_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
|
||||
binary_negate<_Predicate>
|
||||
not2(const _Predicate& __pred) {return binary_negate<_Predicate>(__pred);}
|
||||
|
||||
|
|
|
@ -282,13 +282,13 @@ public:
|
|||
!is_same<typename remove_reference<_Gp>::type,
|
||||
__bind>::value
|
||||
>::type>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
explicit __bind(_Gp&& __f, _BA&& ...__bound_args)
|
||||
: __f_(_VSTD::forward<_Gp>(__f)),
|
||||
__bound_args_(_VSTD::forward<_BA>(__bound_args)...) {}
|
||||
|
||||
template <class ..._Args>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type
|
||||
operator()(_Args&& ...__args)
|
||||
{
|
||||
|
@ -297,7 +297,7 @@ public:
|
|||
}
|
||||
|
||||
template <class ..._Args>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
|
||||
operator()(_Args&& ...__args) const
|
||||
{
|
||||
|
@ -327,13 +327,13 @@ public:
|
|||
!is_same<typename remove_reference<_Gp>::type,
|
||||
__bind_r>::value
|
||||
>::type>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
explicit __bind_r(_Gp&& __f, _BA&& ...__bound_args)
|
||||
: base(_VSTD::forward<_Gp>(__f),
|
||||
_VSTD::forward<_BA>(__bound_args)...) {}
|
||||
|
||||
template <class ..._Args>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
typename enable_if
|
||||
<
|
||||
is_convertible<typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type,
|
||||
|
@ -347,7 +347,7 @@ public:
|
|||
}
|
||||
|
||||
template <class ..._Args>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
typename enable_if
|
||||
<
|
||||
is_convertible<typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type,
|
||||
|
@ -365,7 +365,7 @@ template<class _Rp, class _Fp, class ..._BoundArgs>
|
|||
struct is_bind_expression<__bind_r<_Rp, _Fp, _BoundArgs...> > : public true_type {};
|
||||
|
||||
template<class _Fp, class ..._BoundArgs>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bind<_Fp, _BoundArgs...>
|
||||
bind(_Fp&& __f, _BoundArgs&&... __bound_args)
|
||||
{
|
||||
|
@ -374,7 +374,7 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args)
|
|||
}
|
||||
|
||||
template<class _Rp, class _Fp, class ..._BoundArgs>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
__bind_r<_Rp, _Fp, _BoundArgs...>
|
||||
bind(_Fp&& __f, _BoundArgs&&... __bound_args)
|
||||
{
|
||||
|
|
|
@ -29,13 +29,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
|
||||
class _LIBCPP_TEMPLATE_VIS default_searcher {
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
default_searcher(_ForwardIterator __f, _ForwardIterator __l,
|
||||
_BinaryPredicate __p = _BinaryPredicate())
|
||||
: __first_(__f), __last_(__l), __pred_(__p) {}
|
||||
|
||||
template <typename _ForwardIterator2>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
pair<_ForwardIterator2, _ForwardIterator2>
|
||||
operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
|
||||
{
|
||||
|
|
|
@ -524,7 +524,7 @@ template <class _Fn, class... _Args>
|
|||
using invoke_result_t = typename invoke_result<_Fn, _Args...>::type;
|
||||
|
||||
template <class _Fn, class ..._Args>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 invoke_result_t<_Fn, _Args...>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 invoke_result_t<_Fn, _Args...>
|
||||
invoke(_Fn&& __f, _Args&&... __args)
|
||||
noexcept(is_nothrow_invocable_v<_Fn, _Args...>)
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue