[libc++] Replace uses of _VSTD:: by std:: (#74331)
As part of the upcoming clang-formatting of libc++, this patch performs the long desired removal of the _VSTD macro. See https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all for the clang-format proposal.
This commit is contained in:
parent
c568927f3e
commit
77a00c0d54
@ -67,7 +67,6 @@ avoid invoking a user-defined ``operator,``, make sure to cast the result to
|
||||
In general, try to follow the style of existing code. There are a few
|
||||
exceptions:
|
||||
|
||||
- ``_VSTD::foo`` is no longer used in new code. Use ``std::foo`` instead.
|
||||
- Prefer ``using foo = int`` over ``typedef int foo``. The compilers supported
|
||||
by libc++ accept alias declarations in all standard modes.
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI constexpr const _Tp&
|
||||
clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
|
||||
_LIBCPP_LIFETIMEBOUND const _Tp& __lo,
|
||||
_LIBCPP_LIFETIMEBOUND const _Tp& __hi) {
|
||||
return _VSTD::clamp(__v, __lo, __hi, __less<>());
|
||||
return std::clamp(__v, __lo, __hi, __less<>());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
|
||||
{
|
||||
typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
|
||||
typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
|
||||
_IntegralSize __n = __orig_n;
|
||||
if (__n > 0)
|
||||
{
|
||||
@ -51,9 +51,9 @@ _OutputIterator
|
||||
copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
|
||||
{
|
||||
typedef typename iterator_traits<_InputIterator>::difference_type difference_type;
|
||||
typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
|
||||
typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
|
||||
_IntegralSize __n = __orig_n;
|
||||
return _VSTD::copy(__first, __first + difference_type(__n), __result);
|
||||
return std::copy(__first, __first + difference_type(__n), __result);
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -107,7 +107,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
__equal(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _RandomAccessIterator2 __first2,
|
||||
_RandomAccessIterator2 __last2, _BinaryPredicate __pred, random_access_iterator_tag,
|
||||
random_access_iterator_tag) {
|
||||
if (_VSTD::distance(__first1, __last1) != _VSTD::distance(__first2, __last2))
|
||||
if (std::distance(__first1, __last1) != std::distance(__first2, __last2))
|
||||
return false;
|
||||
__identity __proj;
|
||||
return std::__equal_impl(
|
||||
@ -124,7 +124,7 @@ template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
|
||||
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
|
||||
_BinaryPredicate __pred) {
|
||||
return _VSTD::__equal<_BinaryPredicate&>(
|
||||
return std::__equal<_BinaryPredicate&>(
|
||||
__first1, __last1, __first2, __last2, __pred, typename iterator_traits<_InputIterator1>::iterator_category(),
|
||||
typename iterator_traits<_InputIterator2>::iterator_category());
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
__fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value, random_access_iterator_tag)
|
||||
{
|
||||
_VSTD::fill_n(__first, __last - __first, __value);
|
||||
std::fill_n(__first, __last - __first, __value);
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
@ -43,7 +43,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
|
||||
{
|
||||
_VSTD::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
|
||||
std::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -36,7 +36,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
|
||||
{
|
||||
return _VSTD::__fill_n(__first, _VSTD::__convert_to_integral(__n), __value);
|
||||
return std::__fill_n(__first, std::__convert_to_integral(__n), __value);
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -38,7 +38,7 @@ template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredica
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _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);
|
||||
return std::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred);
|
||||
}
|
||||
|
||||
template <class _ForwardIterator1, class _ForwardIterator2>
|
||||
|
||||
@ -25,7 +25,7 @@ template <class _InputIterator, class _Size, class _Function>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator for_each_n(_InputIterator __first,
|
||||
_Size __orig_n,
|
||||
_Function __f) {
|
||||
typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
|
||||
typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
|
||||
_IntegralSize __n = __orig_n;
|
||||
while (__n > 0) {
|
||||
__f(*__first);
|
||||
|
||||
@ -23,7 +23,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen)
|
||||
{
|
||||
typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
|
||||
typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
|
||||
_IntegralSize __n = __orig_n;
|
||||
for (; __n > 0; ++__first, (void) --__n)
|
||||
*__first = __gen();
|
||||
|
||||
@ -224,10 +224,10 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle,
|
||||
typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type;
|
||||
difference_type __len1 = _IterOps<_AlgPolicy>::distance(__first, __middle);
|
||||
difference_type __len2 = _IterOps<_AlgPolicy>::distance(__middle, __last);
|
||||
difference_type __buf_size = _VSTD::min(__len1, __len2);
|
||||
difference_type __buf_size = std::min(__len1, __len2);
|
||||
// TODO: Remove the use of std::get_temporary_buffer
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
pair<value_type*, ptrdiff_t> __buf = _VSTD::get_temporary_buffer<value_type>(__buf_size);
|
||||
pair<value_type*, ptrdiff_t> __buf = std::get_temporary_buffer<value_type>(__buf_size);
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
unique_ptr<value_type, __return_temporary_buffer> __h(__buf.first);
|
||||
return std::__inplace_merge<_AlgPolicy>(
|
||||
|
||||
@ -36,7 +36,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
|
||||
{
|
||||
return _VSTD::is_heap(__first, __last, __less<>());
|
||||
return std::is_heap(__first, __last, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -58,7 +58,7 @@ template<class _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<>());
|
||||
return std::__is_heap_until(__first, __last, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -27,7 +27,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
||||
{
|
||||
return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
|
||||
return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
|
||||
}
|
||||
|
||||
template<class _ForwardIterator>
|
||||
@ -36,7 +36,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
is_sorted(_ForwardIterator __first, _ForwardIterator __last)
|
||||
{
|
||||
return _VSTD::is_sorted(__first, __last, __less<>());
|
||||
return std::is_sorted(__first, __last, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -41,14 +41,14 @@ template <class _ForwardIterator, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
|
||||
is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
||||
{
|
||||
return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
|
||||
return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
|
||||
}
|
||||
|
||||
template<class _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<>());
|
||||
return std::is_sorted_until(__first, __last, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -42,7 +42,7 @@ bool
|
||||
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
|
||||
{
|
||||
return _VSTD::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp);
|
||||
return std::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp);
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
@ -52,7 +52,7 @@ bool
|
||||
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2)
|
||||
{
|
||||
return _VSTD::lexicographical_compare(__first1, __last1, __first2, __last2, __less<>());
|
||||
return std::lexicographical_compare(__first1, __last1, __first2, __last2, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -39,7 +39,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Tp&
|
||||
max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
|
||||
{
|
||||
return _VSTD::max(__a, __b, __less<>());
|
||||
return std::max(__a, __b, __less<>());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
@ -50,7 +50,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Tp
|
||||
max(initializer_list<_Tp> __t, _Compare __comp)
|
||||
{
|
||||
return *_VSTD::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
|
||||
return *std::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
|
||||
}
|
||||
|
||||
template<class _Tp>
|
||||
@ -59,7 +59,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Tp
|
||||
max(initializer_list<_Tp> __t)
|
||||
{
|
||||
return *_VSTD::max_element(__t.begin(), __t.end(), __less<>());
|
||||
return *std::max_element(__t.begin(), __t.end(), __less<>());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
@ -40,7 +40,7 @@ template <class _ForwardIterator, class _Compare>
|
||||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
|
||||
max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
|
||||
{
|
||||
return _VSTD::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
|
||||
return std::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
|
||||
}
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ template <class _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, __less<>());
|
||||
return std::max_element(__first, __last, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -30,7 +30,7 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
for (; __first1 != __last1; ++__result)
|
||||
{
|
||||
if (__first2 == __last2)
|
||||
return _VSTD::copy(__first1, __last1, __result);
|
||||
return std::copy(__first1, __last1, __result);
|
||||
if (__comp(*__first2, *__first1))
|
||||
{
|
||||
*__result = *__first2;
|
||||
@ -42,7 +42,7 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
++__first1;
|
||||
}
|
||||
}
|
||||
return _VSTD::copy(__first2, __last2, __result);
|
||||
return std::copy(__first2, __last2, __result);
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
|
||||
@ -51,7 +51,7 @@ _OutputIterator
|
||||
merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
|
||||
{
|
||||
return _VSTD::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
return std::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@ -60,7 +60,7 @@ _OutputIterator
|
||||
merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
|
||||
{
|
||||
return _VSTD::merge(__first1, __last1, __first2, __last2, __result, __less<>());
|
||||
return std::merge(__first1, __last1, __first2, __last2, __result, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -39,7 +39,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Tp&
|
||||
min(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
|
||||
{
|
||||
return _VSTD::min(__a, __b, __less<>());
|
||||
return std::min(__a, __b, __less<>());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
@ -50,7 +50,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Tp
|
||||
min(initializer_list<_Tp> __t, _Compare __comp)
|
||||
{
|
||||
return *_VSTD::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
|
||||
return *std::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
|
||||
}
|
||||
|
||||
template<class _Tp>
|
||||
@ -59,7 +59,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
_Tp
|
||||
min(initializer_list<_Tp> __t)
|
||||
{
|
||||
return *_VSTD::min_element(__t.begin(), __t.end(), __less<>());
|
||||
return *std::min_element(__t.begin(), __t.end(), __less<>());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
@ -64,7 +64,7 @@ template <class _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, __less<>());
|
||||
return std::min_element(__first, __last, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -69,7 +69,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
|
||||
{
|
||||
return _VSTD::next_permutation(__first, __last, __less<>());
|
||||
return std::next_permutation(__first, __last, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -92,7 +92,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
|
||||
if (!__comp(*__i, *__m)) // if *__first == *__m
|
||||
{
|
||||
// *__first == *__m, *__first doesn't go in first part
|
||||
if (_VSTD::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) {
|
||||
if (std::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) {
|
||||
_Ops::iter_swap(__i, __j);
|
||||
++__n_swaps;
|
||||
} else {
|
||||
@ -142,7 +142,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
|
||||
return;
|
||||
}
|
||||
// __nth_element the second part
|
||||
// _VSTD::__nth_element<_Compare>(__i, __nth, __last, __comp);
|
||||
// std::__nth_element<_Compare>(__i, __nth, __last, __comp);
|
||||
__first = __i;
|
||||
continue;
|
||||
}
|
||||
@ -228,12 +228,12 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
|
||||
// __nth_element on range containing __nth
|
||||
if (__nth < __i)
|
||||
{
|
||||
// _VSTD::__nth_element<_Compare>(__first, __nth, __i, __comp);
|
||||
// std::__nth_element<_Compare>(__first, __nth, __i, __comp);
|
||||
__last = __i;
|
||||
}
|
||||
else
|
||||
{
|
||||
// _VSTD::__nth_element<_Compare>(__i+1, __nth, __last, __comp);
|
||||
// std::__nth_element<_Compare>(__i+1, __nth, __last, __comp);
|
||||
__first = ++__i;
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
void
|
||||
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
|
||||
{
|
||||
_VSTD::partial_sort(__first, __middle, __last, __less<>());
|
||||
std::partial_sort(__first, __middle, __last, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -79,7 +79,7 @@ _RandomAccessIterator
|
||||
partial_sort_copy(_InputIterator __first, _InputIterator __last,
|
||||
_RandomAccessIterator __result_first, _RandomAccessIterator __result_last)
|
||||
{
|
||||
return _VSTD::partial_sort_copy(__first, __last, __result_first, __result_last, __less<>());
|
||||
return std::partial_sort_copy(__first, __last, __result_first, __result_last, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -26,12 +26,12 @@ _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;
|
||||
difference_type __len = _VSTD::distance(__first, __last);
|
||||
difference_type __len = std::distance(__first, __last);
|
||||
while (__len != 0)
|
||||
{
|
||||
difference_type __l2 = _VSTD::__half_positive(__len);
|
||||
difference_type __l2 = std::__half_positive(__len);
|
||||
_ForwardIterator __m = __first;
|
||||
_VSTD::advance(__m, __l2);
|
||||
std::advance(__m, __l2);
|
||||
if (__pred(*__m))
|
||||
{
|
||||
__first = ++__m;
|
||||
|
||||
@ -70,7 +70,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
bool
|
||||
prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
|
||||
{
|
||||
return _VSTD::prev_permutation(__first, __last, __less<>());
|
||||
return std::prev_permutation(__first, __last, __less<>());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -24,7 +24,7 @@ template <class _ForwardIterator, class _Tp>
|
||||
_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);
|
||||
__first = std::find(__first, __last, __value);
|
||||
if (__first != __last)
|
||||
{
|
||||
_ForwardIterator __i = __first;
|
||||
@ -32,7 +32,7 @@ remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
|
||||
{
|
||||
if (!(*__i == __value))
|
||||
{
|
||||
*__first = _VSTD::move(*__i);
|
||||
*__first = std::move(*__i);
|
||||
++__first;
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ template <class _ForwardIterator, class _Predicate>
|
||||
_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);
|
||||
__first = std::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);
|
||||
if (__first != __last)
|
||||
{
|
||||
_ForwardIterator __i = __first;
|
||||
@ -31,7 +31,7 @@ remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
|
||||
{
|
||||
if (!__pred(*__i))
|
||||
{
|
||||
*__first = _VSTD::move(*__i);
|
||||
*__first = std::move(*__i);
|
||||
++__first;
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ __rotate_left(_ForwardIterator __first, _ForwardIterator __last)
|
||||
value_type __tmp = _Ops::__iter_move(__first);
|
||||
_ForwardIterator __lm1 = std::__move<_AlgPolicy>(
|
||||
_Ops::next(__first), __last, __first).second;
|
||||
*__lm1 = _VSTD::move(__tmp);
|
||||
*__lm1 = std::move(__tmp);
|
||||
return __lm1;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
|
||||
_BidirectionalIterator __lm1 = _Ops::prev(__last);
|
||||
value_type __tmp = _Ops::__iter_move(__lm1);
|
||||
_BidirectionalIterator __fp1 = std::__move_backward<_AlgPolicy>(__first, __lm1, std::move(__last)).second;
|
||||
*__first = _VSTD::move(__tmp);
|
||||
*__first = std::move(__tmp);
|
||||
return __fp1;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
|
||||
std::__swap_ranges<_AlgPolicy>(__first, __middle, __middle, __last);
|
||||
return __middle;
|
||||
}
|
||||
const difference_type __g = _VSTD::__algo_gcd(__m1, __m2);
|
||||
const difference_type __g = std::__algo_gcd(__m1, __m2);
|
||||
for (_RandomAccessIterator __p = __first + __g; __p != __first;)
|
||||
{
|
||||
value_type __t(_Ops::__iter_move(--__p));
|
||||
@ -133,7 +133,7 @@ __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
|
||||
else
|
||||
__p2 = __first + (__m1 - __d);
|
||||
} while (__p2 != __p);
|
||||
*__p1 = _VSTD::move(__t);
|
||||
*__p1 = std::move(__t);
|
||||
}
|
||||
return __first + __m2;
|
||||
}
|
||||
@ -142,7 +142,7 @@ template <class _AlgPolicy, class _ForwardIterator>
|
||||
inline _LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
|
||||
__rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
|
||||
_VSTD::forward_iterator_tag)
|
||||
std::forward_iterator_tag)
|
||||
{
|
||||
typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
|
||||
if (is_trivially_move_assignable<value_type>::value)
|
||||
|
||||
@ -23,7 +23,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
_OutputIterator
|
||||
rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result)
|
||||
{
|
||||
return _VSTD::copy(__first, __middle, _VSTD::copy(__middle, __last, __result));
|
||||
return std::copy(__first, __middle, std::copy(__middle, __last, __result));
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -47,7 +47,7 @@ _SampleIterator __sample(_PopulationIterator __first,
|
||||
if (__r < __sz)
|
||||
__output_iter[__r] = *__first;
|
||||
}
|
||||
return __output_iter + _VSTD::min(__n, __k);
|
||||
return __output_iter + std::min(__n, __k);
|
||||
}
|
||||
|
||||
template <class _AlgPolicy,
|
||||
@ -60,7 +60,7 @@ _SampleIterator __sample(_PopulationIterator __first,
|
||||
_UniformRandomNumberGenerator& __g,
|
||||
forward_iterator_tag) {
|
||||
_Distance __unsampled_sz = _IterOps<_AlgPolicy>::distance(__first, __last);
|
||||
for (__n = _VSTD::min(__n, __unsampled_sz); __n != 0; ++__first) {
|
||||
for (__n = std::min(__n, __unsampled_sz); __n != 0; ++__first) {
|
||||
_Distance __r = uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g);
|
||||
if (__r < __n) {
|
||||
*__output_iter++ = *__first;
|
||||
|
||||
@ -45,7 +45,7 @@ shift_left(_ForwardIterator __first, _ForwardIterator __last,
|
||||
++__m;
|
||||
}
|
||||
}
|
||||
return _VSTD::move(__m, __last, __first);
|
||||
return std::move(__m, __last, __first);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
@ -40,7 +40,7 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
|
||||
return __last;
|
||||
}
|
||||
_ForwardIterator __m = __first + (__d - __n);
|
||||
return _VSTD::move_backward(__first, __m, __last);
|
||||
return std::move_backward(__first, __m, __last);
|
||||
} else if constexpr (__has_bidirectional_iterator_category<_ForwardIterator>::value) {
|
||||
_ForwardIterator __m = __last;
|
||||
for (; __n > 0; --__n) {
|
||||
@ -49,7 +49,7 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
|
||||
}
|
||||
--__m;
|
||||
}
|
||||
return _VSTD::move_backward(__first, __m, __last);
|
||||
return std::move_backward(__first, __m, __last);
|
||||
} else {
|
||||
_ForwardIterator __ret = __first;
|
||||
for (; __n > 0; --__n) {
|
||||
@ -69,7 +69,7 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
|
||||
auto __lead = __ret;
|
||||
while (__trail != __ret) {
|
||||
if (__lead == __last) {
|
||||
_VSTD::move(__first, __trail, __ret);
|
||||
std::move(__first, __trail, __ret);
|
||||
return __ret;
|
||||
}
|
||||
++__trail;
|
||||
@ -79,8 +79,8 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
|
||||
_ForwardIterator __mid = __first;
|
||||
while (true) {
|
||||
if (__lead == __last) {
|
||||
__trail = _VSTD::move(__mid, __ret, __trail);
|
||||
_VSTD::move(__first, __mid, __trail);
|
||||
__trail = std::move(__mid, __ret, __trail);
|
||||
std::move(__first, __mid, __trail);
|
||||
return __ret;
|
||||
}
|
||||
swap(*__mid, *__trail);
|
||||
|
||||
@ -77,7 +77,7 @@ __sift_down(_RandomAccessIterator __first, _Compare&& __comp,
|
||||
|
||||
// check if we are in heap-order
|
||||
} while (!__comp(*__child_i, __top));
|
||||
*__start = _VSTD::move(__top);
|
||||
*__start = std::move(__top);
|
||||
}
|
||||
|
||||
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
|
||||
|
||||
@ -144,7 +144,7 @@ __stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Pred
|
||||
{
|
||||
// TODO: Remove the use of std::get_temporary_buffer
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
__p = _VSTD::get_temporary_buffer<value_type>(__len);
|
||||
__p = std::get_temporary_buffer<value_type>(__len);
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
__h.reset(__p.first);
|
||||
}
|
||||
@ -298,7 +298,7 @@ __stable_partition_impl(_BidirectionalIterator __first, _BidirectionalIterator _
|
||||
{
|
||||
// TODO: Remove the use of std::get_temporary_buffer
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
__p = _VSTD::get_temporary_buffer<value_type>(__len);
|
||||
__p = std::get_temporary_buffer<value_type>(__len);
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
__h.reset(__p.first);
|
||||
}
|
||||
|
||||
@ -230,7 +230,7 @@ __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp
|
||||
__d.__set(__len, (value_type*)nullptr);
|
||||
std::__merge_move_assign<_AlgPolicy, _Compare>(
|
||||
__buff, __buff + __l2, __buff + __l2, __buff + __len, __first, __comp);
|
||||
// _VSTD::__merge<_Compare>(move_iterator<value_type*>(__buff),
|
||||
// std::__merge<_Compare>(move_iterator<value_type*>(__buff),
|
||||
// move_iterator<value_type*>(__buff + __l2),
|
||||
// move_iterator<_RandomAccessIterator>(__buff + __l2),
|
||||
// move_iterator<_RandomAccessIterator>(__buff + __len),
|
||||
|
||||
@ -32,34 +32,34 @@ namespace __compare_partial_order_fallback {
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
|
||||
noexcept(noexcept(_VSTD::partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
-> decltype( _VSTD::partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))
|
||||
{ return _VSTD::partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); }
|
||||
noexcept(noexcept(std::partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
-> decltype( std::partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))
|
||||
{ return std::partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)); }
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
|
||||
noexcept(noexcept(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
|
||||
_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less :
|
||||
_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
|
||||
noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? partial_ordering::equivalent :
|
||||
std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? partial_ordering::less :
|
||||
std::forward<_Up>(__u) < std::forward<_Tp>(__t) ? partial_ordering::greater :
|
||||
partial_ordering::unordered))
|
||||
-> decltype( _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
|
||||
_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less :
|
||||
_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
|
||||
-> decltype( std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? partial_ordering::equivalent :
|
||||
std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? partial_ordering::less :
|
||||
std::forward<_Up>(__u) < std::forward<_Tp>(__t) ? partial_ordering::greater :
|
||||
partial_ordering::unordered)
|
||||
{
|
||||
return _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
|
||||
_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less :
|
||||
_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
|
||||
return std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? partial_ordering::equivalent :
|
||||
std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? partial_ordering::less :
|
||||
std::forward<_Up>(__u) < std::forward<_Tp>(__t) ? partial_ordering::greater :
|
||||
partial_ordering::unordered;
|
||||
}
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
|
||||
noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>())))
|
||||
-> decltype( __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()))
|
||||
{ return __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()); }
|
||||
noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())))
|
||||
-> decltype( __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()))
|
||||
{ return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()); }
|
||||
};
|
||||
} // namespace __compare_partial_order_fallback
|
||||
|
||||
|
||||
@ -32,31 +32,31 @@ namespace __compare_strong_order_fallback {
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
|
||||
noexcept(noexcept(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
-> decltype( _VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))
|
||||
{ return _VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); }
|
||||
noexcept(noexcept(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
-> decltype( std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))
|
||||
{ return std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)); }
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
|
||||
noexcept(noexcept(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? strong_ordering::equal :
|
||||
_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? strong_ordering::less :
|
||||
noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? strong_ordering::equal :
|
||||
std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? strong_ordering::less :
|
||||
strong_ordering::greater))
|
||||
-> decltype( _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? strong_ordering::equal :
|
||||
_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? strong_ordering::less :
|
||||
-> decltype( std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? strong_ordering::equal :
|
||||
std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? strong_ordering::less :
|
||||
strong_ordering::greater)
|
||||
{
|
||||
return _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? strong_ordering::equal :
|
||||
_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? strong_ordering::less :
|
||||
return std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? strong_ordering::equal :
|
||||
std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? strong_ordering::less :
|
||||
strong_ordering::greater;
|
||||
}
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
|
||||
noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>())))
|
||||
-> decltype( __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()))
|
||||
{ return __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()); }
|
||||
noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())))
|
||||
-> decltype( __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()))
|
||||
{ return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()); }
|
||||
};
|
||||
} // namespace __compare_strong_order_fallback
|
||||
|
||||
|
||||
@ -28,8 +28,8 @@ struct _LIBCPP_TEMPLATE_VIS compare_three_way
|
||||
requires three_way_comparable_with<_T1, _T2>
|
||||
constexpr _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) <=> _VSTD::forward<_T2>(__u)))
|
||||
{ return _VSTD::forward<_T1>(__t) <=> _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) <=> std::forward<_T2>(__u)))
|
||||
{ return std::forward<_T1>(__t) <=> std::forward<_T2>(__u); }
|
||||
|
||||
using is_transparent = void;
|
||||
};
|
||||
|
||||
@ -32,31 +32,31 @@ namespace __compare_weak_order_fallback {
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
|
||||
noexcept(noexcept(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
-> decltype( _VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))
|
||||
{ return _VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); }
|
||||
noexcept(noexcept(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
-> decltype( std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))
|
||||
{ return std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)); }
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
|
||||
noexcept(noexcept(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
|
||||
_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? weak_ordering::less :
|
||||
noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? weak_ordering::equivalent :
|
||||
std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? weak_ordering::less :
|
||||
weak_ordering::greater))
|
||||
-> decltype( _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
|
||||
_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? weak_ordering::less :
|
||||
-> decltype( std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? weak_ordering::equivalent :
|
||||
std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? weak_ordering::less :
|
||||
weak_ordering::greater)
|
||||
{
|
||||
return _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
|
||||
_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? weak_ordering::less :
|
||||
return std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? weak_ordering::equivalent :
|
||||
std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? weak_ordering::less :
|
||||
weak_ordering::greater;
|
||||
}
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
|
||||
noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>())))
|
||||
-> decltype( __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()))
|
||||
{ return __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()); }
|
||||
noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())))
|
||||
-> decltype( __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()))
|
||||
{ return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()); }
|
||||
};
|
||||
} // namespace __compare_weak_order_fallback
|
||||
|
||||
|
||||
@ -34,32 +34,32 @@ namespace __partial_order {
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<2>)
|
||||
noexcept(noexcept(partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
|
||||
-> decltype( partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
{ return partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
|
||||
noexcept(noexcept(partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
|
||||
-> decltype( partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
{ return partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
|
||||
// NOLINTEND(libcpp-robust-against-adl)
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
|
||||
noexcept(noexcept(partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
|
||||
-> decltype( partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
{ return partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
|
||||
noexcept(noexcept(partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
|
||||
-> decltype( partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
{ return partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
|
||||
noexcept(noexcept(partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
|
||||
-> decltype( partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
{ return partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
|
||||
noexcept(noexcept(partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
|
||||
-> decltype( partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
{ return partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
|
||||
noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>())))
|
||||
-> decltype( __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()))
|
||||
{ return __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()); }
|
||||
noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>())))
|
||||
-> decltype( __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()))
|
||||
{ return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()); }
|
||||
};
|
||||
} // namespace __partial_order
|
||||
|
||||
|
||||
@ -40,9 +40,9 @@ namespace __strong_order {
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<2>)
|
||||
noexcept(noexcept(strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
|
||||
-> decltype( strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
{ return strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
|
||||
noexcept(noexcept(strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
|
||||
-> decltype( strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
{ return strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
|
||||
// NOLINTEND(libcpp-robust-against-adl)
|
||||
|
||||
template<class _Tp, class _Up, class _Dp = decay_t<_Tp>>
|
||||
@ -51,14 +51,14 @@ namespace __strong_order {
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<1>) noexcept
|
||||
{
|
||||
if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int32_t)) {
|
||||
int32_t __rx = _VSTD::bit_cast<int32_t>(__t);
|
||||
int32_t __ry = _VSTD::bit_cast<int32_t>(__u);
|
||||
int32_t __rx = std::bit_cast<int32_t>(__t);
|
||||
int32_t __ry = std::bit_cast<int32_t>(__u);
|
||||
__rx = (__rx < 0) ? (numeric_limits<int32_t>::min() - __rx - 1) : __rx;
|
||||
__ry = (__ry < 0) ? (numeric_limits<int32_t>::min() - __ry - 1) : __ry;
|
||||
return (__rx <=> __ry);
|
||||
} else if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int64_t)) {
|
||||
int64_t __rx = _VSTD::bit_cast<int64_t>(__t);
|
||||
int64_t __ry = _VSTD::bit_cast<int64_t>(__u);
|
||||
int64_t __rx = std::bit_cast<int64_t>(__t);
|
||||
int64_t __ry = std::bit_cast<int64_t>(__u);
|
||||
__rx = (__rx < 0) ? (numeric_limits<int64_t>::min() - __rx - 1) : __rx;
|
||||
__ry = (__ry < 0) ? (numeric_limits<int64_t>::min() - __ry - 1) : __ry;
|
||||
return (__rx <=> __ry);
|
||||
@ -68,27 +68,27 @@ namespace __strong_order {
|
||||
return strong_ordering::greater;
|
||||
} else if (__t == __u) {
|
||||
if constexpr (numeric_limits<_Dp>::radix == 2) {
|
||||
return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
|
||||
return std::signbit(__u) <=> std::signbit(__t);
|
||||
} else {
|
||||
// This is bullet 3 of the IEEE754 algorithm, relevant
|
||||
// only for decimal floating-point;
|
||||
// see https://stackoverflow.com/questions/69068075/
|
||||
if (__t == 0 || _VSTD::isinf(__t)) {
|
||||
return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
|
||||
if (__t == 0 || std::isinf(__t)) {
|
||||
return std::signbit(__u) <=> std::signbit(__t);
|
||||
} else {
|
||||
int __texp, __uexp;
|
||||
(void)_VSTD::frexp(__t, &__texp);
|
||||
(void)_VSTD::frexp(__u, &__uexp);
|
||||
(void)std::frexp(__t, &__texp);
|
||||
(void)std::frexp(__u, &__uexp);
|
||||
return (__t < 0) ? (__texp <=> __uexp) : (__uexp <=> __texp);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// They're unordered, so one of them must be a NAN.
|
||||
// The order is -QNAN, -SNAN, numbers, +SNAN, +QNAN.
|
||||
bool __t_is_nan = _VSTD::isnan(__t);
|
||||
bool __u_is_nan = _VSTD::isnan(__u);
|
||||
bool __t_is_negative = _VSTD::signbit(__t);
|
||||
bool __u_is_negative = _VSTD::signbit(__u);
|
||||
bool __t_is_nan = std::isnan(__t);
|
||||
bool __u_is_nan = std::isnan(__u);
|
||||
bool __t_is_negative = std::signbit(__t);
|
||||
bool __u_is_negative = std::signbit(__u);
|
||||
using _IntType = conditional_t<
|
||||
sizeof(__t) == sizeof(int32_t), int32_t, conditional_t<
|
||||
sizeof(__t) == sizeof(int64_t), int64_t, void>
|
||||
@ -100,7 +100,7 @@ namespace __strong_order {
|
||||
if (__t_is_negative != __u_is_negative) {
|
||||
return (__u_is_negative <=> __t_is_negative);
|
||||
} else {
|
||||
return _VSTD::bit_cast<_IntType>(__t) <=> _VSTD::bit_cast<_IntType>(__u);
|
||||
return std::bit_cast<_IntType>(__t) <=> std::bit_cast<_IntType>(__u);
|
||||
}
|
||||
} else if (__t_is_nan) {
|
||||
return __t_is_negative ? strong_ordering::less : strong_ordering::greater;
|
||||
@ -114,15 +114,15 @@ namespace __strong_order {
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
|
||||
noexcept(noexcept(strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
|
||||
-> decltype( strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
{ return strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
|
||||
noexcept(noexcept(strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
|
||||
-> decltype( strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
{ return strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
|
||||
noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>())))
|
||||
-> decltype( __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()))
|
||||
{ return __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()); }
|
||||
noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>())))
|
||||
-> decltype( __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()))
|
||||
{ return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()); }
|
||||
};
|
||||
} // namespace __strong_order
|
||||
|
||||
|
||||
@ -34,9 +34,9 @@ namespace __weak_order {
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<3>)
|
||||
noexcept(noexcept(weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
|
||||
-> decltype( weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
{ return weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
|
||||
noexcept(noexcept(weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
|
||||
-> decltype( weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
{ return weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
|
||||
// NOLINTEND(libcpp-robust-against-adl)
|
||||
|
||||
template<class _Tp, class _Up, class _Dp = decay_t<_Tp>>
|
||||
@ -53,10 +53,10 @@ namespace __weak_order {
|
||||
return weak_ordering::greater;
|
||||
} else {
|
||||
// Otherwise, at least one of them is a NaN.
|
||||
bool __t_is_nan = _VSTD::isnan(__t);
|
||||
bool __u_is_nan = _VSTD::isnan(__u);
|
||||
bool __t_is_negative = _VSTD::signbit(__t);
|
||||
bool __u_is_negative = _VSTD::signbit(__u);
|
||||
bool __t_is_nan = std::isnan(__t);
|
||||
bool __u_is_nan = std::isnan(__u);
|
||||
bool __t_is_negative = std::signbit(__t);
|
||||
bool __u_is_negative = std::signbit(__u);
|
||||
if (__t_is_nan && __u_is_nan) {
|
||||
return (__u_is_negative <=> __t_is_negative);
|
||||
} else if (__t_is_nan) {
|
||||
@ -71,23 +71,23 @@ namespace __weak_order {
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
|
||||
noexcept(noexcept(weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
|
||||
-> decltype( weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
{ return weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
|
||||
noexcept(noexcept(weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
|
||||
-> decltype( weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
{ return weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto
|
||||
__go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
|
||||
noexcept(noexcept(weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
|
||||
-> decltype( weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
|
||||
{ return weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
|
||||
noexcept(noexcept(weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
|
||||
-> decltype( weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
|
||||
{ return weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
|
||||
|
||||
template<class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
|
||||
noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>())))
|
||||
-> decltype( __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>()))
|
||||
{ return __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>()); }
|
||||
noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>())))
|
||||
-> decltype( __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>()))
|
||||
{ return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>()); }
|
||||
};
|
||||
} // namespace __weak_order
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ concept assignable_from =
|
||||
is_lvalue_reference_v<_Lhs> &&
|
||||
common_reference_with<__make_const_lvalue_ref<_Lhs>, __make_const_lvalue_ref<_Rhs>> &&
|
||||
requires(_Lhs __lhs, _Rhs&& __rhs) {
|
||||
{ __lhs = _VSTD::forward<_Rhs>(__rhs) } -> same_as<_Lhs>;
|
||||
{ __lhs = std::forward<_Rhs>(__rhs) } -> same_as<_Lhs>;
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
@ -28,7 +28,7 @@ concept __boolean_testable_impl = convertible_to<_Tp, bool>;
|
||||
|
||||
template <class _Tp>
|
||||
concept __boolean_testable = __boolean_testable_impl<_Tp> && requires(_Tp&& __t) {
|
||||
{ !_VSTD::forward<_Tp>(__t) } -> __boolean_testable_impl;
|
||||
{ !std::forward<_Tp>(__t) } -> __boolean_testable_impl;
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Fn, class... _Args>
|
||||
concept invocable = requires(_Fn&& __fn, _Args&&... __args) {
|
||||
_VSTD::invoke(_VSTD::forward<_Fn>(__fn), _VSTD::forward<_Args>(__args)...); // not required to be equality preserving
|
||||
std::invoke(std::forward<_Fn>(__fn), std::forward<_Args>(__args)...); // not required to be equality preserving
|
||||
};
|
||||
|
||||
// [concept.regular.invocable]
|
||||
|
||||
@ -48,7 +48,7 @@ template <class _Tp, class _Up>
|
||||
concept __unqualified_swappable_with =
|
||||
(__class_or_enum<remove_cvref_t<_Tp>> || __class_or_enum<remove_cvref_t<_Up>>) &&
|
||||
requires(_Tp&& __t, _Up&& __u) {
|
||||
swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u));
|
||||
swap(std::forward<_Tp>(__t), std::forward<_Up>(__u));
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@ -74,8 +74,8 @@ struct __fn {
|
||||
template <class _Tp, class _Up>
|
||||
requires __unqualified_swappable_with<_Tp, _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Tp&& __t, _Up&& __u) const
|
||||
noexcept(noexcept(swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) {
|
||||
swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u));
|
||||
noexcept(noexcept(swap(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) {
|
||||
swap(std::forward<_Tp>(__t), std::forward<_Up>(__u));
|
||||
}
|
||||
|
||||
// 2.2 Otherwise, if `E1` and `E2` are lvalues of array types with equal extent and...
|
||||
@ -93,7 +93,7 @@ struct __fn {
|
||||
template <__exchangeable _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Tp& __x, _Tp& __y) const
|
||||
noexcept(is_nothrow_move_constructible_v<_Tp> && is_nothrow_move_assignable_v<_Tp>) {
|
||||
__y = _VSTD::exchange(__x, _VSTD::move(__y));
|
||||
__y = std::exchange(__x, std::move(__y));
|
||||
}
|
||||
};
|
||||
} // namespace __swap
|
||||
@ -108,10 +108,10 @@ concept swappable = requires(_Tp& __a, _Tp& __b) { ranges::swap(__a, __b); };
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
concept swappable_with = common_reference_with<_Tp, _Up> && requires(_Tp&& __t, _Up&& __u) {
|
||||
ranges::swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Tp>(__t));
|
||||
ranges::swap(_VSTD::forward<_Up>(__u), _VSTD::forward<_Up>(__u));
|
||||
ranges::swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u));
|
||||
ranges::swap(_VSTD::forward<_Up>(__u), _VSTD::forward<_Tp>(__t));
|
||||
ranges::swap(std::forward<_Tp>(__t), std::forward<_Tp>(__t));
|
||||
ranges::swap(std::forward<_Up>(__u), std::forward<_Up>(__u));
|
||||
ranges::swap(std::forward<_Tp>(__t), std::forward<_Up>(__u));
|
||||
ranges::swap(std::forward<_Up>(__u), std::forward<_Tp>(__t));
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
@ -815,16 +815,16 @@ typedef __char32_t char32_t;
|
||||
# define _LIBCPP_HIDE_FROM_ABI_AFTER_V1 _LIBCPP_HIDE_FROM_ABI
|
||||
# endif
|
||||
|
||||
// TODO(LLVM-19): Remove _LIBCPP_INLINE_VISIBILITY, which we're keeping around only to
|
||||
// ease the renaming for downstreams.
|
||||
// TODO(LLVM-19): Remove _LIBCPP_INLINE_VISIBILITY and _VSTD, which we're keeping around
|
||||
// only to ease the renaming for downstreams.
|
||||
# define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
|
||||
# define _VSTD std
|
||||
|
||||
// Inline namespaces are available in Clang/GCC/MSVC regardless of C++ dialect.
|
||||
// clang-format off
|
||||
# define _LIBCPP_BEGIN_NAMESPACE_STD namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std { \
|
||||
inline namespace _LIBCPP_ABI_NAMESPACE {
|
||||
# define _LIBCPP_END_NAMESPACE_STD }}
|
||||
# define _VSTD std
|
||||
|
||||
# define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM _LIBCPP_BEGIN_NAMESPACE_STD \
|
||||
inline namespace __fs { namespace filesystem {
|
||||
|
||||
@ -117,7 +117,7 @@ public:
|
||||
using _RawPromise = __remove_cv_t<_Promise>;
|
||||
coroutine_handle __tmp;
|
||||
__tmp.__handle_ =
|
||||
__builtin_coro_promise(_VSTD::addressof(const_cast<_RawPromise&>(__promise)), alignof(_Promise), true);
|
||||
__builtin_coro_promise(std::addressof(const_cast<_RawPromise&>(__promise)), alignof(_Promise), true);
|
||||
return __tmp;
|
||||
}
|
||||
|
||||
|
||||
@ -316,7 +316,7 @@ private:
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
void __assign_iter_entry(_Path&& __p, __cached_data __dt) {
|
||||
__p_ = _VSTD::move(__p);
|
||||
__p_ = std::move(__p);
|
||||
__data_ = __dt;
|
||||
}
|
||||
|
||||
@ -502,7 +502,7 @@ private:
|
||||
class __dir_element_proxy {
|
||||
public:
|
||||
inline _LIBCPP_HIDE_FROM_ABI directory_entry operator*() {
|
||||
return _VSTD::move(__elem_);
|
||||
return std::move(__elem_);
|
||||
}
|
||||
|
||||
private:
|
||||
@ -510,7 +510,7 @@ private:
|
||||
friend class recursive_directory_iterator;
|
||||
_LIBCPP_HIDE_FROM_ABI explicit __dir_element_proxy(directory_entry const& __e) : __elem_(__e) {}
|
||||
_LIBCPP_HIDE_FROM_ABI __dir_element_proxy(__dir_element_proxy&& __o)
|
||||
: __elem_(_VSTD::move(__o.__elem_)) {}
|
||||
: __elem_(std::move(__o.__elem_)) {}
|
||||
directory_entry __elem_;
|
||||
};
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ public:
|
||||
directory_iterator& operator=(directory_iterator&& __o) noexcept {
|
||||
// non-default implementation provided to support self-move assign.
|
||||
if (this != &__o) {
|
||||
__imp_ = _VSTD::move(__o.__imp_);
|
||||
__imp_ = std::move(__o.__imp_);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@ -156,11 +156,11 @@ _LIBCPP_END_NAMESPACE_FILESYSTEM
|
||||
|
||||
template <>
|
||||
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
|
||||
inline constexpr bool _VSTD::ranges::enable_borrowed_range<std::filesystem::directory_iterator> = true;
|
||||
inline constexpr bool std::ranges::enable_borrowed_range<std::filesystem::directory_iterator> = true;
|
||||
|
||||
template <>
|
||||
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
|
||||
inline constexpr bool _VSTD::ranges::enable_view<std::filesystem::directory_iterator> = true;
|
||||
inline constexpr bool std::ranges::enable_view<std::filesystem::directory_iterator> = true;
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ private:
|
||||
template <class... _Args>
|
||||
_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY void
|
||||
__throw_filesystem_error(_Args&&... __args) {
|
||||
throw filesystem_error(_VSTD::forward<_Args>(__args)...);
|
||||
throw filesystem_error(std::forward<_Args>(__args)...);
|
||||
}
|
||||
# else
|
||||
template <class... _Args>
|
||||
|
||||
@ -469,11 +469,11 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI path() noexcept {}
|
||||
_LIBCPP_HIDE_FROM_ABI path(const path& __p) : __pn_(__p.__pn_) {}
|
||||
_LIBCPP_HIDE_FROM_ABI path(path&& __p) noexcept
|
||||
: __pn_(_VSTD::move(__p.__pn_)) {}
|
||||
: __pn_(std::move(__p.__pn_)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
path(string_type&& __s, format = format::auto_format) noexcept
|
||||
: __pn_(_VSTD::move(__s)) {}
|
||||
: __pn_(std::move(__s)) {}
|
||||
|
||||
template <class _Source, class = _EnableIfPathable<_Source, void> >
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
@ -511,19 +511,19 @@ public:
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
path& operator=(path&& __p) noexcept {
|
||||
__pn_ = _VSTD::move(__p.__pn_);
|
||||
__pn_ = std::move(__p.__pn_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
path& operator=(string_type&& __s) noexcept {
|
||||
__pn_ = _VSTD::move(__s);
|
||||
__pn_ = std::move(__s);
|
||||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
path& assign(string_type&& __s) noexcept {
|
||||
__pn_ = _VSTD::move(__s);
|
||||
__pn_ = std::move(__s);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -709,7 +709,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
path& make_preferred() {
|
||||
#if defined(_LIBCPP_WIN32API)
|
||||
_VSTD::replace(__pn_.begin(), __pn_.end(), L'/', L'\\');
|
||||
std::replace(__pn_.begin(), __pn_.end(), L'/', L'\\');
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
@ -778,13 +778,13 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI operator string_type() const { return __pn_; }
|
||||
|
||||
#if defined(_LIBCPP_WIN32API)
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::wstring wstring() const { return __pn_; }
|
||||
_LIBCPP_HIDE_FROM_ABI std::wstring wstring() const { return __pn_; }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_VSTD::wstring generic_wstring() const {
|
||||
_VSTD::wstring __s;
|
||||
std::wstring generic_wstring() const {
|
||||
std::wstring __s;
|
||||
__s.resize(__pn_.size());
|
||||
_VSTD::replace_copy(__pn_.begin(), __pn_.end(), __s.begin(), '\\', '/');
|
||||
std::replace_copy(__pn_.begin(), __pn_.end(), __s.begin(), '\\', '/');
|
||||
return __s;
|
||||
}
|
||||
|
||||
@ -801,7 +801,7 @@ public:
|
||||
return __s;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::string string() const {
|
||||
_LIBCPP_HIDE_FROM_ABI std::string string() const {
|
||||
return string<char>();
|
||||
}
|
||||
_LIBCPP_HIDE_FROM_ABI __u8_string u8string() const {
|
||||
@ -812,10 +812,10 @@ public:
|
||||
return __s;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::u16string u16string() const {
|
||||
_LIBCPP_HIDE_FROM_ABI std::u16string u16string() const {
|
||||
return string<char16_t>();
|
||||
}
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::u32string u32string() const {
|
||||
_LIBCPP_HIDE_FROM_ABI std::u32string u32string() const {
|
||||
return string<char32_t>();
|
||||
}
|
||||
|
||||
@ -830,28 +830,28 @@ public:
|
||||
// Note: This (and generic_u8string below) is slightly suboptimal as
|
||||
// it iterates twice over the string; once to convert it to the right
|
||||
// character type, and once to replace path delimiters.
|
||||
_VSTD::replace(__s.begin(), __s.end(),
|
||||
std::replace(__s.begin(), __s.end(),
|
||||
static_cast<_ECharT>('\\'), static_cast<_ECharT>('/'));
|
||||
return __s;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::string generic_string() const { return generic_string<char>(); }
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::u16string generic_u16string() const { return generic_string<char16_t>(); }
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::u32string generic_u32string() const { return generic_string<char32_t>(); }
|
||||
_LIBCPP_HIDE_FROM_ABI std::string generic_string() const { return generic_string<char>(); }
|
||||
_LIBCPP_HIDE_FROM_ABI std::u16string generic_u16string() const { return generic_string<char16_t>(); }
|
||||
_LIBCPP_HIDE_FROM_ABI std::u32string generic_u32string() const { return generic_string<char32_t>(); }
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
__u8_string generic_u8string() const {
|
||||
__u8_string __s = u8string();
|
||||
_VSTD::replace(__s.begin(), __s.end(), '\\', '/');
|
||||
std::replace(__s.begin(), __s.end(), '\\', '/');
|
||||
return __s;
|
||||
}
|
||||
#endif /* !_LIBCPP_HAS_NO_LOCALIZATION */
|
||||
#else /* _LIBCPP_WIN32API */
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::string string() const { return __pn_; }
|
||||
_LIBCPP_HIDE_FROM_ABI std::string string() const { return __pn_; }
|
||||
#ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::u8string u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); }
|
||||
_LIBCPP_HIDE_FROM_ABI std::u8string u8string() const { return std::u8string(__pn_.begin(), __pn_.end()); }
|
||||
#else
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::string u8string() const { return __pn_; }
|
||||
_LIBCPP_HIDE_FROM_ABI std::string u8string() const { return __pn_; }
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
|
||||
@ -869,24 +869,24 @@ public:
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::wstring wstring() const {
|
||||
_LIBCPP_HIDE_FROM_ABI std::wstring wstring() const {
|
||||
return string<wchar_t>();
|
||||
}
|
||||
#endif
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::u16string u16string() const {
|
||||
_LIBCPP_HIDE_FROM_ABI std::u16string u16string() const {
|
||||
return string<char16_t>();
|
||||
}
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::u32string u32string() const {
|
||||
_LIBCPP_HIDE_FROM_ABI std::u32string u32string() const {
|
||||
return string<char32_t>();
|
||||
}
|
||||
#endif /* !_LIBCPP_HAS_NO_LOCALIZATION */
|
||||
|
||||
// generic format observers
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::string generic_string() const { return __pn_; }
|
||||
_LIBCPP_HIDE_FROM_ABI std::string generic_string() const { return __pn_; }
|
||||
#ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::u8string generic_u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); }
|
||||
_LIBCPP_HIDE_FROM_ABI std::u8string generic_u8string() const { return std::u8string(__pn_.begin(), __pn_.end()); }
|
||||
#else
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::string generic_u8string() const { return __pn_; }
|
||||
_LIBCPP_HIDE_FROM_ABI std::string generic_u8string() const { return __pn_; }
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
|
||||
@ -899,10 +899,10 @@ public:
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::wstring generic_wstring() const { return string<wchar_t>(); }
|
||||
_LIBCPP_HIDE_FROM_ABI std::wstring generic_wstring() const { return string<wchar_t>(); }
|
||||
#endif
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::u16string generic_u16string() const { return string<char16_t>(); }
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::u32string generic_u32string() const { return string<char32_t>(); }
|
||||
_LIBCPP_HIDE_FROM_ABI std::u16string generic_u16string() const { return string<char16_t>(); }
|
||||
_LIBCPP_HIDE_FROM_ABI std::u32string generic_u32string() const { return string<char32_t>(); }
|
||||
#endif /* !_LIBCPP_HAS_NO_LOCALIZATION */
|
||||
#endif /* !_LIBCPP_WIN32API */
|
||||
|
||||
@ -1039,7 +1039,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI friend
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) {
|
||||
__os << _VSTD::__quoted(__p.native());
|
||||
__os << std::__quoted(__p.native());
|
||||
return __os;
|
||||
}
|
||||
|
||||
@ -1048,7 +1048,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI friend
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) {
|
||||
__os << _VSTD::__quoted(__p.string<_CharT, _Traits>());
|
||||
__os << std::__quoted(__p.string<_CharT, _Traits>());
|
||||
return __os;
|
||||
}
|
||||
|
||||
@ -1056,7 +1056,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI friend basic_istream<_CharT, _Traits>&
|
||||
operator>>(basic_istream<_CharT, _Traits>& __is, path& __p) {
|
||||
basic_string<_CharT, _Traits> __tmp;
|
||||
__is >> _VSTD::__quoted(__tmp);
|
||||
__is >> std::__quoted(__tmp);
|
||||
__p = __tmp;
|
||||
return __is;
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ public:
|
||||
operator=(recursive_directory_iterator&& __o) noexcept {
|
||||
// non-default implementation provided to support self-move assign.
|
||||
if (this != &__o) {
|
||||
__imp_ = _VSTD::move(__o.__imp_);
|
||||
__imp_ = std::move(__o.__imp_);
|
||||
__rec_ = __o.__rec_;
|
||||
}
|
||||
return *this;
|
||||
@ -170,11 +170,11 @@ _LIBCPP_END_NAMESPACE_FILESYSTEM
|
||||
|
||||
template <>
|
||||
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
|
||||
inline constexpr bool _VSTD::ranges::enable_borrowed_range<std::filesystem::recursive_directory_iterator> = true;
|
||||
inline constexpr bool std::ranges::enable_borrowed_range<std::filesystem::recursive_directory_iterator> = true;
|
||||
|
||||
template <>
|
||||
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
|
||||
inline constexpr bool _VSTD::ranges::enable_view<std::filesystem::recursive_directory_iterator> = true;
|
||||
inline constexpr bool std::ranges::enable_view<std::filesystem::recursive_directory_iterator> = true;
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T
|
||||
#if defined(_LIBCPP_WIN32API)
|
||||
string __tmp(__f, __l);
|
||||
using _CVT = __widen_from_utf8<sizeof(wchar_t) * __CHAR_BIT__>;
|
||||
_VSTD::wstring __w;
|
||||
std::wstring __w;
|
||||
__w.reserve(__tmp.size());
|
||||
_CVT()(back_inserter(__w), __tmp.data(), __tmp.data() + __tmp.size());
|
||||
return path(__w);
|
||||
@ -72,7 +72,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T
|
||||
for (; *__f != __sentinel; ++__f)
|
||||
__tmp.push_back(*__f);
|
||||
using _CVT = __widen_from_utf8<sizeof(wchar_t) * __CHAR_BIT__>;
|
||||
_VSTD::wstring __w;
|
||||
std::wstring __w;
|
||||
__w.reserve(__tmp.size());
|
||||
_CVT()(back_inserter(__w), __tmp.data(), __tmp.data() + __tmp.size());
|
||||
return path(__w);
|
||||
@ -92,7 +92,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T
|
||||
"'char' or 'char8_t'");
|
||||
#if defined(_LIBCPP_WIN32API)
|
||||
using _Traits = __is_pathable<_Source>;
|
||||
return u8path(_VSTD::__unwrap_iter(_Traits::__range_begin(__s)), _VSTD::__unwrap_iter(_Traits::__range_end(__s)));
|
||||
return u8path(std::__unwrap_iter(_Traits::__range_begin(__s)), std::__unwrap_iter(_Traits::__range_end(__s)));
|
||||
#else
|
||||
return path(__s);
|
||||
#endif
|
||||
|
||||
@ -108,7 +108,7 @@ public:
|
||||
|
||||
__flush_on_overflow(__n);
|
||||
if (__n < __capacity_) { // push_back requires the buffer to have room for at least one character (so use <).
|
||||
_VSTD::copy_n(__str.data(), __n, _VSTD::addressof(__ptr_[__size_]));
|
||||
std::copy_n(__str.data(), __n, std::addressof(__ptr_[__size_]));
|
||||
__size_ += __n;
|
||||
return;
|
||||
}
|
||||
@ -118,8 +118,8 @@ public:
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__size_ == 0, "the buffer should be flushed by __flush_on_overflow");
|
||||
const _InCharT* __first = __str.data();
|
||||
do {
|
||||
size_t __chunk = _VSTD::min(__n, __capacity_);
|
||||
_VSTD::copy_n(__first, __chunk, _VSTD::addressof(__ptr_[__size_]));
|
||||
size_t __chunk = std::min(__n, __capacity_);
|
||||
std::copy_n(__first, __chunk, std::addressof(__ptr_[__size_]));
|
||||
__size_ = __chunk;
|
||||
__first += __chunk;
|
||||
__n -= __chunk;
|
||||
@ -137,7 +137,7 @@ public:
|
||||
size_t __n = static_cast<size_t>(__last - __first);
|
||||
__flush_on_overflow(__n);
|
||||
if (__n < __capacity_) { // push_back requires the buffer to have room for at least one character (so use <).
|
||||
_VSTD::transform(__first, __last, _VSTD::addressof(__ptr_[__size_]), _VSTD::move(__operation));
|
||||
std::transform(__first, __last, std::addressof(__ptr_[__size_]), std::move(__operation));
|
||||
__size_ += __n;
|
||||
return;
|
||||
}
|
||||
@ -146,8 +146,8 @@ public:
|
||||
// Transform the data in "__capacity_" sized chunks.
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__size_ == 0, "the buffer should be flushed by __flush_on_overflow");
|
||||
do {
|
||||
size_t __chunk = _VSTD::min(__n, __capacity_);
|
||||
_VSTD::transform(__first, __first + __chunk, _VSTD::addressof(__ptr_[__size_]), __operation);
|
||||
size_t __chunk = std::min(__n, __capacity_);
|
||||
std::transform(__first, __first + __chunk, std::addressof(__ptr_[__size_]), __operation);
|
||||
__size_ = __chunk;
|
||||
__first += __chunk;
|
||||
__n -= __chunk;
|
||||
@ -159,7 +159,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI void __fill(size_t __n, _CharT __value) {
|
||||
__flush_on_overflow(__n);
|
||||
if (__n < __capacity_) { // push_back requires the buffer to have room for at least one character (so use <).
|
||||
_VSTD::fill_n(_VSTD::addressof(__ptr_[__size_]), __n, __value);
|
||||
std::fill_n(std::addressof(__ptr_[__size_]), __n, __value);
|
||||
__size_ += __n;
|
||||
return;
|
||||
}
|
||||
@ -168,8 +168,8 @@ public:
|
||||
// Fill the buffer in "__capacity_" sized chunks.
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__size_ == 0, "the buffer should be flushed by __flush_on_overflow");
|
||||
do {
|
||||
size_t __chunk = _VSTD::min(__n, __capacity_);
|
||||
_VSTD::fill_n(_VSTD::addressof(__ptr_[__size_]), __chunk, __value);
|
||||
size_t __chunk = std::min(__n, __capacity_);
|
||||
std::fill_n(std::addressof(__ptr_[__size_]), __chunk, __value);
|
||||
__size_ = __chunk;
|
||||
__n -= __chunk;
|
||||
__flush();
|
||||
@ -282,7 +282,7 @@ template <class _OutIt, __fmt_char_type _CharT>
|
||||
class _LIBCPP_TEMPLATE_VIS __writer_iterator {
|
||||
public:
|
||||
_LIBCPP_HIDE_FROM_ABI explicit __writer_iterator(_OutIt __out_it)
|
||||
: __out_it_{_VSTD::move(__out_it)} {}
|
||||
: __out_it_{std::move(__out_it)} {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _OutIt __out_it() && { return std::move(__out_it_); }
|
||||
|
||||
@ -359,12 +359,12 @@ requires(output_iterator<_OutIt, const _CharT&>) class _LIBCPP_TEMPLATE_VIS
|
||||
public:
|
||||
_LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it)
|
||||
requires(same_as<_Storage, __internal_storage<_CharT>>)
|
||||
: __output_(__storage_.__begin(), __storage_.__buffer_size, this), __writer_(_VSTD::move(__out_it)) {}
|
||||
: __output_(__storage_.__begin(), __storage_.__buffer_size, this), __writer_(std::move(__out_it)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it) requires(
|
||||
same_as<_Storage, __direct_storage<_CharT>>)
|
||||
: __output_(_VSTD::__unwrap_iter(__out_it), size_t(-1), this),
|
||||
__writer_(_VSTD::move(__out_it)) {}
|
||||
: __output_(std::__unwrap_iter(__out_it), size_t(-1), this),
|
||||
__writer_(std::move(__out_it)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return __output_.__make_output_iterator(); }
|
||||
|
||||
@ -372,7 +372,7 @@ public:
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _OutIt __out_it() && {
|
||||
__output_.__flush();
|
||||
return _VSTD::move(__writer_).__out_it();
|
||||
return std::move(__writer_).__out_it();
|
||||
}
|
||||
|
||||
private:
|
||||
@ -411,11 +411,11 @@ struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base {
|
||||
|
||||
public:
|
||||
_LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __max_size)
|
||||
: __writer_(_VSTD::move(__out_it)), __max_size_(_VSTD::max(_Size(0), __max_size)) {}
|
||||
: __writer_(std::move(__out_it)), __max_size_(std::max(_Size(0), __max_size)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) {
|
||||
if (_Size(__size_) <= __max_size_)
|
||||
__writer_.__flush(__ptr, _VSTD::min(_Size(__n), __max_size_ - __size_));
|
||||
__writer_.__flush(__ptr, std::min(_Size(__n), __max_size_ - __size_));
|
||||
__size_ += __n;
|
||||
}
|
||||
|
||||
@ -441,8 +441,8 @@ class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> {
|
||||
|
||||
public:
|
||||
_LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __max_size)
|
||||
: __output_(_VSTD::__unwrap_iter(__out_it), __max_size, this),
|
||||
__writer_(_VSTD::move(__out_it)),
|
||||
: __output_(std::__unwrap_iter(__out_it), __max_size, this),
|
||||
__writer_(std::move(__out_it)),
|
||||
__max_size_(__max_size) {
|
||||
if (__max_size <= 0) [[unlikely]]
|
||||
__output_.__reset(__storage_.__begin(), __storage_.__buffer_size);
|
||||
@ -466,7 +466,7 @@ public:
|
||||
} else if (__size_ < __max_size_) {
|
||||
// Copies a part of the internal buffer to the output up to n characters.
|
||||
// See __output_buffer<_CharT>::__flush_on_overflow for more information.
|
||||
_Size __s = _VSTD::min(_Size(__n), __max_size_ - __size_);
|
||||
_Size __s = std::min(_Size(__n), __max_size_ - __size_);
|
||||
std::copy_n(__ptr, __s, __writer_.__out_it());
|
||||
__writer_.__flush(__ptr, __s);
|
||||
}
|
||||
@ -493,12 +493,12 @@ struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final
|
||||
|
||||
public:
|
||||
_LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer(_OutIt __out_it, _Size __max_size)
|
||||
: _Base(_VSTD::move(__out_it), __max_size) {}
|
||||
: _Base(std::move(__out_it), __max_size) {}
|
||||
_LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return this->__output_.__make_output_iterator(); }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __result() && {
|
||||
this->__output_.__flush();
|
||||
return {_VSTD::move(this->__writer_).__out_it(), this->__size_};
|
||||
return {std::move(this->__writer_).__out_it(), this->__size_};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -100,45 +100,45 @@ _LIBCPP_HIDE_FROM_ABI decltype(auto)
|
||||
__visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
|
||||
switch (__arg.__type_) {
|
||||
case __format::__arg_t::__none:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__monostate_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__monostate_);
|
||||
case __format::__arg_t::__boolean:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__boolean_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__boolean_);
|
||||
case __format::__arg_t::__char_type:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__char_type_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__char_type_);
|
||||
case __format::__arg_t::__int:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__int_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__int_);
|
||||
case __format::__arg_t::__long_long:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__long_long_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__long_long_);
|
||||
case __format::__arg_t::__i128:
|
||||
# ifndef _LIBCPP_HAS_NO_INT128
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__i128_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__i128_);
|
||||
# else
|
||||
__libcpp_unreachable();
|
||||
# endif
|
||||
case __format::__arg_t::__unsigned:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__unsigned_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__unsigned_);
|
||||
case __format::__arg_t::__unsigned_long_long:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__unsigned_long_long_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__unsigned_long_long_);
|
||||
case __format::__arg_t::__u128:
|
||||
# ifndef _LIBCPP_HAS_NO_INT128
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__u128_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__u128_);
|
||||
# else
|
||||
__libcpp_unreachable();
|
||||
# endif
|
||||
case __format::__arg_t::__float:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__float_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__float_);
|
||||
case __format::__arg_t::__double:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__double_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__double_);
|
||||
case __format::__arg_t::__long_double:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__long_double_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__long_double_);
|
||||
case __format::__arg_t::__const_char_type_ptr:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__const_char_type_ptr_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__const_char_type_ptr_);
|
||||
case __format::__arg_t::__string_view:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__string_view_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__string_view_);
|
||||
case __format::__arg_t::__ptr:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__ptr_);
|
||||
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__ptr_);
|
||||
case __format::__arg_t::__handle:
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis),
|
||||
return std::invoke(std::forward<_Visitor>(__vis),
|
||||
typename basic_format_arg<_Context>::handle{__arg.__value_.__handle_});
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ public:
|
||||
struct __handle {
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI explicit __handle(_Tp& __v) noexcept
|
||||
: __ptr_(_VSTD::addressof(__v)),
|
||||
: __ptr_(std::addressof(__v)),
|
||||
__format_([](basic_format_parse_context<_CharT>& __parse_ctx, _Context& __ctx, const void* __ptr) {
|
||||
using _Dp = remove_const_t<_Tp>;
|
||||
using _Qp = conditional_t<__formattable_with<const _Dp, _Context>, const _Dp, _Dp>;
|
||||
@ -278,16 +278,16 @@ visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
|
||||
# ifndef _LIBCPP_HAS_NO_INT128
|
||||
case __format::__arg_t::__i128: {
|
||||
typename __basic_format_arg_value<_Context>::__handle __h{__arg.__value_.__i128_};
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), typename basic_format_arg<_Context>::handle{__h});
|
||||
return std::invoke(std::forward<_Visitor>(__vis), typename basic_format_arg<_Context>::handle{__h});
|
||||
}
|
||||
|
||||
case __format::__arg_t::__u128: {
|
||||
typename __basic_format_arg_value<_Context>::__handle __h{__arg.__value_.__u128_};
|
||||
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), typename basic_format_arg<_Context>::handle{__h});
|
||||
return std::invoke(std::forward<_Visitor>(__vis), typename basic_format_arg<_Context>::handle{__h});
|
||||
}
|
||||
# endif
|
||||
default:
|
||||
return _VSTD::__visit_format_arg(_VSTD::forward<_Visitor>(__vis), __arg);
|
||||
return std::__visit_format_arg(std::forward<_Visitor>(__vis), __arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -54,8 +54,8 @@ _LIBCPP_HIDE_FROM_ABI basic_format_context<_OutIt, _CharT>
|
||||
__format_context_create(
|
||||
_OutIt __out_it,
|
||||
basic_format_args<basic_format_context<_OutIt, _CharT>> __args,
|
||||
optional<_VSTD::locale>&& __loc = nullopt) {
|
||||
return _VSTD::basic_format_context(_VSTD::move(__out_it), __args, _VSTD::move(__loc));
|
||||
optional<std::locale>&& __loc = nullopt) {
|
||||
return std::basic_format_context(std::move(__out_it), __args, std::move(__loc));
|
||||
}
|
||||
#else
|
||||
template <class _OutIt, class _CharT>
|
||||
@ -63,7 +63,7 @@ _LIBCPP_HIDE_FROM_ABI basic_format_context<_OutIt, _CharT>
|
||||
__format_context_create(
|
||||
_OutIt __out_it,
|
||||
basic_format_args<basic_format_context<_OutIt, _CharT>> __args) {
|
||||
return _VSTD::basic_format_context(_VSTD::move(__out_it), __args);
|
||||
return std::basic_format_context(std::move(__out_it), __args);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -95,9 +95,9 @@ public:
|
||||
return __args_.get(__id);
|
||||
}
|
||||
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::locale locale() {
|
||||
_LIBCPP_HIDE_FROM_ABI std::locale locale() {
|
||||
if (!__loc_)
|
||||
__loc_ = _VSTD::locale{};
|
||||
__loc_ = std::locale{};
|
||||
return *__loc_;
|
||||
}
|
||||
#endif
|
||||
@ -118,20 +118,20 @@ private:
|
||||
// locale() is called and the optional has no value the value will be created.
|
||||
// This allows the implementation to lazily create the locale.
|
||||
// TODO FMT Validate whether lazy creation is the best solution.
|
||||
optional<_VSTD::locale> __loc_;
|
||||
optional<std::locale> __loc_;
|
||||
|
||||
template <class _OtherOutIt, class _OtherCharT>
|
||||
friend _LIBCPP_HIDE_FROM_ABI basic_format_context<_OtherOutIt, _OtherCharT>
|
||||
__format_context_create(_OtherOutIt, basic_format_args<basic_format_context<_OtherOutIt, _OtherCharT>>,
|
||||
optional<_VSTD::locale>&&);
|
||||
optional<std::locale>&&);
|
||||
|
||||
// Note: the Standard doesn't specify the required constructors.
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit basic_format_context(_OutIt __out_it,
|
||||
basic_format_args<basic_format_context> __args,
|
||||
optional<_VSTD::locale>&& __loc)
|
||||
: __out_it_(_VSTD::move(__out_it)), __args_(__args),
|
||||
__loc_(_VSTD::move(__loc)) {}
|
||||
optional<std::locale>&& __loc)
|
||||
: __out_it_(std::move(__out_it)), __args_(__args),
|
||||
__loc_(std::move(__loc)) {}
|
||||
#else
|
||||
template <class _OtherOutIt, class _OtherCharT>
|
||||
friend _LIBCPP_HIDE_FROM_ABI basic_format_context<_OtherOutIt, _OtherCharT>
|
||||
@ -140,7 +140,7 @@ private:
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit basic_format_context(_OutIt __out_it,
|
||||
basic_format_args<basic_format_context> __args)
|
||||
: __out_it_(_VSTD::move(__out_it)), __args_(__args) {}
|
||||
: __out_it_(std::move(__out_it)), __args_(__args) {}
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -198,7 +198,7 @@ public:
|
||||
return __arg_(__ctx_, __id);
|
||||
}
|
||||
# ifndef _LIBCPP_HAS_NO_LOCALIZATION
|
||||
_LIBCPP_HIDE_FROM_ABI _VSTD::locale locale() { return __loc_(__ctx_); }
|
||||
_LIBCPP_HIDE_FROM_ABI std::locale locale() { return __loc_(__ctx_); }
|
||||
# endif
|
||||
_LIBCPP_HIDE_FROM_ABI iterator out() { return std::move(__out_it_); }
|
||||
_LIBCPP_HIDE_FROM_ABI void advance_to(iterator __it) { __out_it_ = std::move(__it); }
|
||||
|
||||
@ -64,14 +64,14 @@ using wformat_args = basic_format_args<wformat_context>;
|
||||
|
||||
template <class _Context = format_context, class... _Args>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI __format_arg_store<_Context, _Args...> make_format_args(_Args&&... __args) {
|
||||
return _VSTD::__format_arg_store<_Context, _Args...>(__args...);
|
||||
return std::__format_arg_store<_Context, _Args...>(__args...);
|
||||
}
|
||||
|
||||
# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
template <class... _Args>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI __format_arg_store<wformat_context, _Args...>
|
||||
make_wformat_args(_Args&&... __args) {
|
||||
return _VSTD::__format_arg_store<wformat_context, _Args...>(__args...);
|
||||
return std::__format_arg_store<wformat_context, _Args...>(__args...);
|
||||
}
|
||||
# endif
|
||||
|
||||
@ -271,7 +271,7 @@ __handle_replacement_field(_Iterator __begin, _Iterator __end,
|
||||
else if (__parse)
|
||||
__format::__compile_time_visit_format_arg(__parse_ctx, __ctx, __type);
|
||||
} else
|
||||
_VSTD::__visit_format_arg(
|
||||
std::__visit_format_arg(
|
||||
[&](auto __arg) {
|
||||
if constexpr (same_as<decltype(__arg), monostate>)
|
||||
std::__throw_format_error("The argument index value is too large for the number of arguments supplied");
|
||||
@ -310,7 +310,7 @@ __vformat_to(_ParseCtx&& __parse_ctx, _Ctx&& __ctx) {
|
||||
std::__throw_format_error("The format string terminates at a '{'");
|
||||
|
||||
if (*__begin != _CharT('{')) [[likely]] {
|
||||
__ctx.advance_to(_VSTD::move(__out_it));
|
||||
__ctx.advance_to(std::move(__out_it));
|
||||
__begin =
|
||||
__format::__handle_replacement_field(__begin, __end, __parse_ctx, __ctx);
|
||||
__out_it = __ctx.out();
|
||||
@ -410,13 +410,13 @@ requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
|
||||
_OutIt __out_it, basic_string_view<_CharT> __fmt,
|
||||
basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
|
||||
if constexpr (same_as<_OutIt, _FormatOutIt>)
|
||||
return _VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
|
||||
_VSTD::__format_context_create(_VSTD::move(__out_it), __args));
|
||||
return std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
|
||||
std::__format_context_create(std::move(__out_it), __args));
|
||||
else {
|
||||
__format::__format_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it)};
|
||||
_VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
|
||||
_VSTD::__format_context_create(__buffer.__make_output_iterator(), __args));
|
||||
return _VSTD::move(__buffer).__out_it();
|
||||
__format::__format_buffer<_OutIt, _CharT> __buffer{std::move(__out_it)};
|
||||
std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
|
||||
std::__format_context_create(__buffer.__make_output_iterator(), __args));
|
||||
return std::move(__buffer).__out_it();
|
||||
}
|
||||
}
|
||||
|
||||
@ -426,30 +426,30 @@ requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
|
||||
template <output_iterator<const char&> _OutIt>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
|
||||
vformat_to(_OutIt __out_it, string_view __fmt, format_args __args) {
|
||||
return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args);
|
||||
return std::__vformat_to(std::move(__out_it), __fmt, __args);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
template <output_iterator<const wchar_t&> _OutIt>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
|
||||
vformat_to(_OutIt __out_it, wstring_view __fmt, wformat_args __args) {
|
||||
return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args);
|
||||
return std::__vformat_to(std::move(__out_it), __fmt, __args);
|
||||
}
|
||||
#endif
|
||||
|
||||
template <output_iterator<const char&> _OutIt, class... _Args>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
|
||||
format_to(_OutIt __out_it, format_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::vformat_to(_VSTD::move(__out_it), __fmt.get(),
|
||||
_VSTD::make_format_args(__args...));
|
||||
return std::vformat_to(std::move(__out_it), __fmt.get(),
|
||||
std::make_format_args(__args...));
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
template <output_iterator<const wchar_t&> _OutIt, class... _Args>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
|
||||
format_to(_OutIt __out_it, wformat_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::vformat_to(_VSTD::move(__out_it), __fmt.get(),
|
||||
_VSTD::make_wformat_args(__args...));
|
||||
return std::vformat_to(std::move(__out_it), __fmt.get(),
|
||||
std::make_wformat_args(__args...));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -459,7 +459,7 @@ template <class = void>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI string
|
||||
vformat(string_view __fmt, format_args __args) {
|
||||
string __res;
|
||||
_VSTD::vformat_to(_VSTD::back_inserter(__res), __fmt, __args);
|
||||
std::vformat_to(std::back_inserter(__res), __fmt, __args);
|
||||
return __res;
|
||||
}
|
||||
|
||||
@ -470,7 +470,7 @@ template <class = void>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI wstring
|
||||
vformat(wstring_view __fmt, wformat_args __args) {
|
||||
wstring __res;
|
||||
_VSTD::vformat_to(_VSTD::back_inserter(__res), __fmt, __args);
|
||||
std::vformat_to(std::back_inserter(__res), __fmt, __args);
|
||||
return __res;
|
||||
}
|
||||
# endif
|
||||
@ -478,14 +478,14 @@ vformat(wstring_view __fmt, wformat_args __args) {
|
||||
template <class... _Args>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI string
|
||||
format(format_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::vformat(__fmt.get(), _VSTD::make_format_args(__args...));
|
||||
return std::vformat(__fmt.get(), std::make_format_args(__args...));
|
||||
}
|
||||
|
||||
# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
template <class... _Args>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI wstring
|
||||
format(wformat_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::vformat(__fmt.get(), _VSTD::make_wformat_args(__args...));
|
||||
return std::vformat(__fmt.get(), std::make_wformat_args(__args...));
|
||||
}
|
||||
# endif
|
||||
|
||||
@ -493,16 +493,16 @@ template <class _Context, class _OutIt, class _CharT>
|
||||
_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n,
|
||||
basic_string_view<_CharT> __fmt,
|
||||
basic_format_args<_Context> __args) {
|
||||
__format::__format_to_n_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it), __n};
|
||||
_VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
|
||||
_VSTD::__format_context_create(__buffer.__make_output_iterator(), __args));
|
||||
return _VSTD::move(__buffer).__result();
|
||||
__format::__format_to_n_buffer<_OutIt, _CharT> __buffer{std::move(__out_it), __n};
|
||||
std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
|
||||
std::__format_context_create(__buffer.__make_output_iterator(), __args));
|
||||
return std::move(__buffer).__result();
|
||||
}
|
||||
|
||||
template <output_iterator<const char&> _OutIt, class... _Args>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt>
|
||||
format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, format_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::__vformat_to_n<format_context>(_VSTD::move(__out_it), __n, __fmt.get(), _VSTD::make_format_args(__args...));
|
||||
return std::__vformat_to_n<format_context>(std::move(__out_it), __n, __fmt.get(), std::make_format_args(__args...));
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
@ -510,29 +510,29 @@ template <output_iterator<const wchar_t&> _OutIt, class... _Args>
|
||||
_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt>
|
||||
format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, wformat_string<_Args...> __fmt,
|
||||
_Args&&... __args) {
|
||||
return _VSTD::__vformat_to_n<wformat_context>(_VSTD::move(__out_it), __n, __fmt.get(), _VSTD::make_wformat_args(__args...));
|
||||
return std::__vformat_to_n<wformat_context>(std::move(__out_it), __n, __fmt.get(), std::make_wformat_args(__args...));
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class _CharT>
|
||||
_LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(basic_string_view<_CharT> __fmt, auto __args) {
|
||||
__format::__formatted_size_buffer<_CharT> __buffer;
|
||||
_VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
|
||||
_VSTD::__format_context_create(__buffer.__make_output_iterator(), __args));
|
||||
return _VSTD::move(__buffer).__result();
|
||||
std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
|
||||
std::__format_context_create(__buffer.__make_output_iterator(), __args));
|
||||
return std::move(__buffer).__result();
|
||||
}
|
||||
|
||||
template <class... _Args>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI size_t
|
||||
formatted_size(format_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::__vformatted_size(__fmt.get(), basic_format_args{_VSTD::make_format_args(__args...)});
|
||||
return std::__vformatted_size(__fmt.get(), basic_format_args{std::make_format_args(__args...)});
|
||||
}
|
||||
|
||||
# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
template <class... _Args>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI size_t
|
||||
formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::__vformatted_size(__fmt.get(), basic_format_args{_VSTD::make_wformat_args(__args...)});
|
||||
return std::__vformatted_size(__fmt.get(), basic_format_args{std::make_wformat_args(__args...)});
|
||||
}
|
||||
# endif
|
||||
|
||||
@ -544,22 +544,22 @@ requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
|
||||
_OutIt __out_it, locale __loc, basic_string_view<_CharT> __fmt,
|
||||
basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
|
||||
if constexpr (same_as<_OutIt, _FormatOutIt>)
|
||||
return _VSTD::__format::__vformat_to(
|
||||
return std::__format::__vformat_to(
|
||||
basic_format_parse_context{__fmt, __args.__size()},
|
||||
_VSTD::__format_context_create(_VSTD::move(__out_it), __args, _VSTD::move(__loc)));
|
||||
std::__format_context_create(std::move(__out_it), __args, std::move(__loc)));
|
||||
else {
|
||||
__format::__format_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it)};
|
||||
_VSTD::__format::__vformat_to(
|
||||
__format::__format_buffer<_OutIt, _CharT> __buffer{std::move(__out_it)};
|
||||
std::__format::__vformat_to(
|
||||
basic_format_parse_context{__fmt, __args.__size()},
|
||||
_VSTD::__format_context_create(__buffer.__make_output_iterator(), __args, _VSTD::move(__loc)));
|
||||
return _VSTD::move(__buffer).__out_it();
|
||||
std::__format_context_create(__buffer.__make_output_iterator(), __args, std::move(__loc)));
|
||||
return std::move(__buffer).__out_it();
|
||||
}
|
||||
}
|
||||
|
||||
template <output_iterator<const char&> _OutIt>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt vformat_to(
|
||||
_OutIt __out_it, locale __loc, string_view __fmt, format_args __args) {
|
||||
return _VSTD::__vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt,
|
||||
return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt,
|
||||
__args);
|
||||
}
|
||||
|
||||
@ -567,7 +567,7 @@ _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt vformat_to(
|
||||
template <output_iterator<const wchar_t&> _OutIt>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt vformat_to(
|
||||
_OutIt __out_it, locale __loc, wstring_view __fmt, wformat_args __args) {
|
||||
return _VSTD::__vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt,
|
||||
return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt,
|
||||
__args);
|
||||
}
|
||||
#endif
|
||||
@ -575,16 +575,16 @@ _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt vformat_to(
|
||||
template <output_iterator<const char&> _OutIt, class... _Args>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
|
||||
format_to(_OutIt __out_it, locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt.get(),
|
||||
_VSTD::make_format_args(__args...));
|
||||
return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt.get(),
|
||||
std::make_format_args(__args...));
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
template <output_iterator<const wchar_t&> _OutIt, class... _Args>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
|
||||
format_to(_OutIt __out_it, locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt.get(),
|
||||
_VSTD::make_wformat_args(__args...));
|
||||
return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt.get(),
|
||||
std::make_wformat_args(__args...));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -594,7 +594,7 @@ template <class = void>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI string
|
||||
vformat(locale __loc, string_view __fmt, format_args __args) {
|
||||
string __res;
|
||||
_VSTD::vformat_to(_VSTD::back_inserter(__res), _VSTD::move(__loc), __fmt,
|
||||
std::vformat_to(std::back_inserter(__res), std::move(__loc), __fmt,
|
||||
__args);
|
||||
return __res;
|
||||
}
|
||||
@ -606,7 +606,7 @@ template <class = void>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI wstring
|
||||
vformat(locale __loc, wstring_view __fmt, wformat_args __args) {
|
||||
wstring __res;
|
||||
_VSTD::vformat_to(_VSTD::back_inserter(__res), _VSTD::move(__loc), __fmt,
|
||||
std::vformat_to(std::back_inserter(__res), std::move(__loc), __fmt,
|
||||
__args);
|
||||
return __res;
|
||||
}
|
||||
@ -615,16 +615,16 @@ vformat(locale __loc, wstring_view __fmt, wformat_args __args) {
|
||||
template <class... _Args>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI string
|
||||
format(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::vformat(_VSTD::move(__loc), __fmt.get(),
|
||||
_VSTD::make_format_args(__args...));
|
||||
return std::vformat(std::move(__loc), __fmt.get(),
|
||||
std::make_format_args(__args...));
|
||||
}
|
||||
|
||||
# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
template <class... _Args>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI wstring
|
||||
format(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::vformat(_VSTD::move(__loc), __fmt.get(),
|
||||
_VSTD::make_wformat_args(__args...));
|
||||
return std::vformat(std::move(__loc), __fmt.get(),
|
||||
std::make_wformat_args(__args...));
|
||||
}
|
||||
# endif
|
||||
|
||||
@ -632,19 +632,19 @@ template <class _Context, class _OutIt, class _CharT>
|
||||
_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n,
|
||||
locale __loc, basic_string_view<_CharT> __fmt,
|
||||
basic_format_args<_Context> __args) {
|
||||
__format::__format_to_n_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it), __n};
|
||||
_VSTD::__format::__vformat_to(
|
||||
__format::__format_to_n_buffer<_OutIt, _CharT> __buffer{std::move(__out_it), __n};
|
||||
std::__format::__vformat_to(
|
||||
basic_format_parse_context{__fmt, __args.__size()},
|
||||
_VSTD::__format_context_create(__buffer.__make_output_iterator(), __args, _VSTD::move(__loc)));
|
||||
return _VSTD::move(__buffer).__result();
|
||||
std::__format_context_create(__buffer.__make_output_iterator(), __args, std::move(__loc)));
|
||||
return std::move(__buffer).__result();
|
||||
}
|
||||
|
||||
template <output_iterator<const char&> _OutIt, class... _Args>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt>
|
||||
format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, format_string<_Args...> __fmt,
|
||||
_Args&&... __args) {
|
||||
return _VSTD::__vformat_to_n<format_context>(_VSTD::move(__out_it), __n, _VSTD::move(__loc), __fmt.get(),
|
||||
_VSTD::make_format_args(__args...));
|
||||
return std::__vformat_to_n<format_context>(std::move(__out_it), __n, std::move(__loc), __fmt.get(),
|
||||
std::make_format_args(__args...));
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
@ -652,31 +652,31 @@ template <output_iterator<const wchar_t&> _OutIt, class... _Args>
|
||||
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt>
|
||||
format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, wformat_string<_Args...> __fmt,
|
||||
_Args&&... __args) {
|
||||
return _VSTD::__vformat_to_n<wformat_context>(_VSTD::move(__out_it), __n, _VSTD::move(__loc), __fmt.get(),
|
||||
_VSTD::make_wformat_args(__args...));
|
||||
return std::__vformat_to_n<wformat_context>(std::move(__out_it), __n, std::move(__loc), __fmt.get(),
|
||||
std::make_wformat_args(__args...));
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class _CharT>
|
||||
_LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(locale __loc, basic_string_view<_CharT> __fmt, auto __args) {
|
||||
__format::__formatted_size_buffer<_CharT> __buffer;
|
||||
_VSTD::__format::__vformat_to(
|
||||
std::__format::__vformat_to(
|
||||
basic_format_parse_context{__fmt, __args.__size()},
|
||||
_VSTD::__format_context_create(__buffer.__make_output_iterator(), __args, _VSTD::move(__loc)));
|
||||
return _VSTD::move(__buffer).__result();
|
||||
std::__format_context_create(__buffer.__make_output_iterator(), __args, std::move(__loc)));
|
||||
return std::move(__buffer).__result();
|
||||
}
|
||||
|
||||
template <class... _Args>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI size_t
|
||||
formatted_size(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::__vformatted_size(_VSTD::move(__loc), __fmt.get(), basic_format_args{_VSTD::make_format_args(__args...)});
|
||||
return std::__vformatted_size(std::move(__loc), __fmt.get(), basic_format_args{std::make_format_args(__args...)});
|
||||
}
|
||||
|
||||
# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
template <class... _Args>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI size_t
|
||||
formatted_size(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
|
||||
return _VSTD::__vformatted_size(_VSTD::move(__loc), __fmt.get(), basic_format_args{_VSTD::make_wformat_args(__args...)});
|
||||
return std::__vformatted_size(std::move(__loc), __fmt.get(), basic_format_args{std::make_wformat_args(__args...)});
|
||||
}
|
||||
# endif
|
||||
|
||||
|
||||
@ -56,21 +56,21 @@ namespace __formatter {
|
||||
|
||||
template <floating_point _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value) {
|
||||
to_chars_result __r = _VSTD::to_chars(__first, __last, __value);
|
||||
to_chars_result __r = std::to_chars(__first, __last, __value);
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__r.ec == errc(0), "Internal buffer too small");
|
||||
return __r.ptr;
|
||||
}
|
||||
|
||||
template <floating_point _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, chars_format __fmt) {
|
||||
to_chars_result __r = _VSTD::to_chars(__first, __last, __value, __fmt);
|
||||
to_chars_result __r = std::to_chars(__first, __last, __value, __fmt);
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__r.ec == errc(0), "Internal buffer too small");
|
||||
return __r.ptr;
|
||||
}
|
||||
|
||||
template <floating_point _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, chars_format __fmt, int __precision) {
|
||||
to_chars_result __r = _VSTD::to_chars(__first, __last, __value, __fmt, __precision);
|
||||
to_chars_result __r = std::to_chars(__first, __last, __value, __fmt, __precision);
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__r.ec == errc(0), "Internal buffer too small");
|
||||
return __r.ptr;
|
||||
}
|
||||
@ -224,7 +224,7 @@ struct __float_result {
|
||||
constexpr inline _LIBCPP_HIDE_FROM_ABI char* __find_exponent(char* __first, char* __last) {
|
||||
ptrdiff_t __size = __last - __first;
|
||||
if (__size >= 4) {
|
||||
__first = __last - _VSTD::min(__size, ptrdiff_t(6));
|
||||
__first = __last - std::min(__size, ptrdiff_t(6));
|
||||
for (; __first != __last - 3; ++__first) {
|
||||
if (*__first == 'e')
|
||||
return __first;
|
||||
@ -245,7 +245,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_default(const __float_buffe
|
||||
// Constrains:
|
||||
// - There's at least one decimal digit before the radix point.
|
||||
// - The radix point, when present, is placed before the exponent.
|
||||
__result.__radix_point = _VSTD::find(__result.__integral + 1, __result.__exponent, '.');
|
||||
__result.__radix_point = std::find(__result.__integral + 1, __result.__exponent, '.');
|
||||
|
||||
// When the radix point isn't found its position is the exponent instead of
|
||||
// __result.__last.
|
||||
@ -299,7 +299,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_lower_case(cons
|
||||
|
||||
char* __last = __result.__last - 2;
|
||||
__first = __last - __traits<_Fp>::__hex_precision_digits;
|
||||
__result.__exponent = _VSTD::find(__first, __last, 'p');
|
||||
__result.__exponent = std::find(__first, __last, 'p');
|
||||
} else {
|
||||
__result.__radix_point = __result.__last;
|
||||
__result.__exponent = __first;
|
||||
@ -321,7 +321,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_upper_case(cons
|
||||
char* __integral) {
|
||||
__float_result __result =
|
||||
__formatter::__format_buffer_hexadecimal_lower_case(__buffer, __value, __precision, __integral);
|
||||
_VSTD::transform(__result.__integral, __result.__exponent, __result.__integral, __hex_to_upper);
|
||||
std::transform(__result.__integral, __result.__exponent, __result.__integral, __hex_to_upper);
|
||||
*__result.__exponent = 'P';
|
||||
return __result;
|
||||
}
|
||||
@ -411,7 +411,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_general_lower_case(__float_
|
||||
// In fixed mode the algorithm truncates trailing spaces and possibly the
|
||||
// radix point. There's no good guess for the position of the radix point
|
||||
// therefore scan the output after the first digit.
|
||||
__result.__radix_point = _VSTD::find(__first, __result.__last, '.');
|
||||
__result.__radix_point = std::find(__first, __result.__last, '.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -502,13 +502,13 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
|
||||
_OutIt __out_it,
|
||||
const __float_buffer<_Fp>& __buffer,
|
||||
const __float_result& __result,
|
||||
_VSTD::locale __loc,
|
||||
std::locale __loc,
|
||||
__format_spec::__parsed_specifications<_CharT> __specs) {
|
||||
const auto& __np = std::use_facet<numpunct<_CharT>>(__loc);
|
||||
string __grouping = __np.grouping();
|
||||
char* __first = __result.__integral;
|
||||
// When no radix point or exponent are present __last will be __result.__last.
|
||||
char* __last = _VSTD::min(__result.__radix_point, __result.__exponent);
|
||||
char* __last = std::min(__result.__radix_point, __result.__exponent);
|
||||
|
||||
ptrdiff_t __digits = __last - __first;
|
||||
if (!__grouping.empty()) {
|
||||
@ -538,13 +538,13 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
|
||||
// sign and (zero padding or alignment)
|
||||
if (__zero_padding && __first != __buffer.begin())
|
||||
*__out_it++ = *__buffer.begin();
|
||||
__out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
|
||||
__out_it = __formatter::__fill(std::move(__out_it), __padding.__before_, __specs.__fill_);
|
||||
if (!__zero_padding && __first != __buffer.begin())
|
||||
*__out_it++ = *__buffer.begin();
|
||||
|
||||
// integral part
|
||||
if (__grouping.empty()) {
|
||||
__out_it = __formatter::__copy(__first, __digits, _VSTD::move(__out_it));
|
||||
__out_it = __formatter::__copy(__first, __digits, std::move(__out_it));
|
||||
} else {
|
||||
auto __r = __grouping.rbegin();
|
||||
auto __e = __grouping.rend() - 1;
|
||||
@ -556,7 +556,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
|
||||
// This loop achieves that process by testing the termination condition
|
||||
// midway in the loop.
|
||||
while (true) {
|
||||
__out_it = __formatter::__copy(__first, *__r, _VSTD::move(__out_it));
|
||||
__out_it = __formatter::__copy(__first, *__r, std::move(__out_it));
|
||||
__first += *__r;
|
||||
|
||||
if (__r == __e)
|
||||
@ -570,16 +570,16 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
|
||||
// fractional part
|
||||
if (__result.__radix_point != __result.__last) {
|
||||
*__out_it++ = __np.decimal_point();
|
||||
__out_it = __formatter::__copy(__result.__radix_point + 1, __result.__exponent, _VSTD::move(__out_it));
|
||||
__out_it = __formatter::__fill(_VSTD::move(__out_it), __buffer.__num_trailing_zeros(), _CharT('0'));
|
||||
__out_it = __formatter::__copy(__result.__radix_point + 1, __result.__exponent, std::move(__out_it));
|
||||
__out_it = __formatter::__fill(std::move(__out_it), __buffer.__num_trailing_zeros(), _CharT('0'));
|
||||
}
|
||||
|
||||
// exponent
|
||||
if (__result.__exponent != __result.__last)
|
||||
__out_it = __formatter::__copy(__result.__exponent, __result.__last, _VSTD::move(__out_it));
|
||||
__out_it = __formatter::__copy(__result.__exponent, __result.__last, std::move(__out_it));
|
||||
|
||||
// alignment
|
||||
return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
|
||||
return __formatter::__fill(std::move(__out_it), __padding.__after_, __specs.__fill_);
|
||||
}
|
||||
# endif // _LIBCPP_HAS_NO_LOCALIZATION
|
||||
|
||||
@ -597,7 +597,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_floating_point_non_finite(
|
||||
__specs.__std_.__type_ == __format_spec::__type::__scientific_upper_case ||
|
||||
__specs.__std_.__type_ == __format_spec::__type::__fixed_upper_case ||
|
||||
__specs.__std_.__type_ == __format_spec::__type::__general_upper_case;
|
||||
__last = _VSTD::copy_n(&("infnanINFNAN"[6 * __upper_case + 3 * __isnan]), 3, __last);
|
||||
__last = std::copy_n(&("infnanINFNAN"[6 * __upper_case + 3 * __isnan]), 3, __last);
|
||||
|
||||
// [format.string.std]/13
|
||||
// A zero (0) character preceding the width field pads the field with
|
||||
@ -606,7 +606,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_floating_point_non_finite(
|
||||
if (__specs.__alignment_ == __format_spec::__alignment::__zero_padding)
|
||||
__specs.__alignment_ = __format_spec::__alignment::__right;
|
||||
|
||||
return __formatter::__write(__buffer, __last, _VSTD::move(__out_it), __specs);
|
||||
return __formatter::__write(__buffer, __last, std::move(__out_it), __specs);
|
||||
}
|
||||
|
||||
/// Writes additional zero's for the precision before the exponent.
|
||||
@ -632,21 +632,21 @@ _LIBCPP_HIDE_FROM_ABI auto __write_using_trailing_zeros(
|
||||
|
||||
__padding_size_result __padding =
|
||||
__formatter::__padding_size(__size + __num_trailing_zeros, __specs.__width_, __specs.__alignment_);
|
||||
__out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
|
||||
__out_it = __formatter::__copy(__first, __exponent, _VSTD::move(__out_it));
|
||||
__out_it = __formatter::__fill(_VSTD::move(__out_it), __num_trailing_zeros, _CharT('0'));
|
||||
__out_it = __formatter::__copy(__exponent, __last, _VSTD::move(__out_it));
|
||||
return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
|
||||
__out_it = __formatter::__fill(std::move(__out_it), __padding.__before_, __specs.__fill_);
|
||||
__out_it = __formatter::__copy(__first, __exponent, std::move(__out_it));
|
||||
__out_it = __formatter::__fill(std::move(__out_it), __num_trailing_zeros, _CharT('0'));
|
||||
__out_it = __formatter::__copy(__exponent, __last, std::move(__out_it));
|
||||
return __formatter::__fill(std::move(__out_it), __padding.__after_, __specs.__fill_);
|
||||
}
|
||||
|
||||
|
||||
template <floating_point _Tp, class _CharT, class _FormatContext>
|
||||
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
|
||||
__format_floating_point(_Tp __value, _FormatContext& __ctx, __format_spec::__parsed_specifications<_CharT> __specs) {
|
||||
bool __negative = _VSTD::signbit(__value);
|
||||
bool __negative = std::signbit(__value);
|
||||
|
||||
if (!_VSTD::isfinite(__value)) [[unlikely]]
|
||||
return __formatter::__format_floating_point_non_finite(__ctx.out(), __specs, __negative, _VSTD::isnan(__value));
|
||||
if (!std::isfinite(__value)) [[unlikely]]
|
||||
return __formatter::__format_floating_point_non_finite(__ctx.out(), __specs, __negative, std::isnan(__value));
|
||||
|
||||
// Depending on the std-format-spec string the sign and the value
|
||||
// might not be outputted together:
|
||||
@ -672,7 +672,7 @@ __format_floating_point(_Tp __value, _FormatContext& __ctx, __format_spec::__par
|
||||
// When there is an exponent the point needs to be moved before the
|
||||
// exponent. When there's no exponent the rotate does nothing. Since
|
||||
// rotate tests whether the operation is a nop, call it unconditionally.
|
||||
_VSTD::rotate(__result.__exponent, __result.__last - 1, __result.__last);
|
||||
std::rotate(__result.__exponent, __result.__last - 1, __result.__last);
|
||||
__result.__radix_point = __result.__exponent;
|
||||
|
||||
// The radix point is always placed before the exponent.
|
||||
@ -697,7 +697,7 @@ __format_floating_point(_Tp __value, _FormatContext& __ctx, __format_spec::__par
|
||||
// Let P equal the precision if nonzero, 6 if the precision is not
|
||||
// specified, or 1 if the precision is 0. Then, if a conversion with
|
||||
// style E would have an exponent of X:
|
||||
int __p = _VSTD::max(1, (__specs.__has_precision() ? __specs.__precision_ : 6));
|
||||
int __p = std::max(1, (__specs.__has_precision() ? __specs.__precision_ : 6));
|
||||
if (__result.__exponent == __result.__last)
|
||||
// if P > X >= -4, the conversion is with style f or F and precision P - 1 - X.
|
||||
// By including the radix point it calculates P - (1 + X)
|
||||
@ -749,9 +749,9 @@ __format_floating_point(_Tp __value, _FormatContext& __ctx, __format_spec::__par
|
||||
|
||||
if (__num_trailing_zeros)
|
||||
return __formatter::__write_using_trailing_zeros(
|
||||
__first, __result.__last, _VSTD::move(__out_it), __specs, __size, __result.__exponent, __num_trailing_zeros);
|
||||
__first, __result.__last, std::move(__out_it), __specs, __size, __result.__exponent, __num_trailing_zeros);
|
||||
|
||||
return __formatter::__write(__first, __result.__last, _VSTD::move(__out_it), __specs, __size);
|
||||
return __formatter::__write(__first, __result.__last, std::move(__out_it), __specs, __size);
|
||||
}
|
||||
|
||||
} // namespace __formatter
|
||||
|
||||
@ -141,7 +141,7 @@ _LIBCPP_HIDE_FROM_ABI auto __format_char(
|
||||
}
|
||||
|
||||
const auto __c = static_cast<_CharT>(__value);
|
||||
return __formatter::__write(_VSTD::addressof(__c), _VSTD::addressof(__c) + 1, _VSTD::move(__out_it), __specs);
|
||||
return __formatter::__write(std::addressof(__c), std::addressof(__c) + 1, std::move(__out_it), __specs);
|
||||
}
|
||||
|
||||
//
|
||||
@ -153,7 +153,7 @@ template <integral _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, int __base) {
|
||||
// TODO FMT Evaluate code overhead due to not calling the internal function
|
||||
// directly. (Should be zero overhead.)
|
||||
to_chars_result __r = _VSTD::to_chars(__first, __last, __value, __base);
|
||||
to_chars_result __r = std::to_chars(__first, __last, __value, __base);
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__r.ec == errc(0), "Internal buffer too small");
|
||||
return __r.ptr;
|
||||
}
|
||||
@ -214,22 +214,22 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
|
||||
__padding_size_result __padding = {0, 0};
|
||||
if (__specs.__alignment_ == __format_spec::__alignment::__zero_padding) {
|
||||
// Write [sign][prefix].
|
||||
__out_it = __formatter::__copy(__begin, __first, _VSTD::move(__out_it));
|
||||
__out_it = __formatter::__copy(__begin, __first, std::move(__out_it));
|
||||
|
||||
if (__specs.__width_ > __size) {
|
||||
// Write zero padding.
|
||||
__padding.__before_ = __specs.__width_ - __size;
|
||||
__out_it = __formatter::__fill(_VSTD::move(__out_it), __specs.__width_ - __size, _CharT('0'));
|
||||
__out_it = __formatter::__fill(std::move(__out_it), __specs.__width_ - __size, _CharT('0'));
|
||||
}
|
||||
} else {
|
||||
if (__specs.__width_ > __size) {
|
||||
// Determine padding and write padding.
|
||||
__padding = __formatter::__padding_size(__size, __specs.__width_, __specs.__alignment_);
|
||||
|
||||
__out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
|
||||
__out_it = __formatter::__fill(std::move(__out_it), __padding.__before_, __specs.__fill_);
|
||||
}
|
||||
// Write [sign][prefix].
|
||||
__out_it = __formatter::__copy(__begin, __first, _VSTD::move(__out_it));
|
||||
__out_it = __formatter::__copy(__begin, __first, std::move(__out_it));
|
||||
}
|
||||
|
||||
auto __r = __grouping.rbegin();
|
||||
@ -250,10 +250,10 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
|
||||
while (true) {
|
||||
if (__specs.__std_.__type_ == __format_spec::__type::__hexadecimal_upper_case) {
|
||||
__last = __first + *__r;
|
||||
__out_it = __formatter::__transform(__first, __last, _VSTD::move(__out_it), __hex_to_upper);
|
||||
__out_it = __formatter::__transform(__first, __last, std::move(__out_it), __hex_to_upper);
|
||||
__first = __last;
|
||||
} else {
|
||||
__out_it = __formatter::__copy(__first, *__r, _VSTD::move(__out_it));
|
||||
__out_it = __formatter::__copy(__first, *__r, std::move(__out_it));
|
||||
__first += *__r;
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
|
||||
*__out_it++ = __sep;
|
||||
}
|
||||
|
||||
return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
|
||||
return __formatter::__fill(std::move(__out_it), __padding.__after_, __specs.__fill_);
|
||||
}
|
||||
|
||||
|
||||
@ -315,12 +315,12 @@ _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator __format_integer(
|
||||
// The zero padding is done like:
|
||||
// - Write [sign][prefix]
|
||||
// - Write data right aligned with '0' as fill character.
|
||||
__out_it = __formatter::__copy(__begin, __first, _VSTD::move(__out_it));
|
||||
__out_it = __formatter::__copy(__begin, __first, std::move(__out_it));
|
||||
__specs.__alignment_ = __format_spec::__alignment::__right;
|
||||
__specs.__fill_.__data[0] = _CharT('0');
|
||||
int32_t __size = __first - __begin;
|
||||
|
||||
__specs.__width_ -= _VSTD::min(__size, __specs.__width_);
|
||||
__specs.__width_ -= std::min(__size, __specs.__width_);
|
||||
}
|
||||
|
||||
if (__specs.__std_.__type_ != __format_spec::__type::__hexadecimal_upper_case) [[likely]]
|
||||
|
||||
@ -98,15 +98,15 @@ __padding_size(size_t __size, size_t __width, __format_spec::__alignment __align
|
||||
template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
|
||||
_LIBCPP_HIDE_FROM_ABI auto __copy(basic_string_view<_CharT> __str, output_iterator<const _OutCharT&> auto __out_it)
|
||||
-> decltype(__out_it) {
|
||||
if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
|
||||
if constexpr (std::same_as<decltype(__out_it), std::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
|
||||
__out_it.__get_container()->__copy(__str);
|
||||
return __out_it;
|
||||
} else if constexpr (_VSTD::same_as<decltype(__out_it),
|
||||
} else if constexpr (std::same_as<decltype(__out_it),
|
||||
typename __format::__retarget_buffer<_OutCharT>::__iterator>) {
|
||||
__out_it.__buffer_->__copy(__str);
|
||||
return __out_it;
|
||||
} else {
|
||||
return std::ranges::copy(__str, _VSTD::move(__out_it)).out;
|
||||
return std::ranges::copy(__str, std::move(__out_it)).out;
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,13 +114,13 @@ template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
|
||||
_LIBCPP_HIDE_FROM_ABI auto
|
||||
__copy(const _CharT* __first, const _CharT* __last, output_iterator<const _OutCharT&> auto __out_it)
|
||||
-> decltype(__out_it) {
|
||||
return __formatter::__copy(basic_string_view{__first, __last}, _VSTD::move(__out_it));
|
||||
return __formatter::__copy(basic_string_view{__first, __last}, std::move(__out_it));
|
||||
}
|
||||
|
||||
template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
|
||||
_LIBCPP_HIDE_FROM_ABI auto __copy(const _CharT* __first, size_t __n, output_iterator<const _OutCharT&> auto __out_it)
|
||||
-> decltype(__out_it) {
|
||||
return __formatter::__copy(basic_string_view{__first, __n}, _VSTD::move(__out_it));
|
||||
return __formatter::__copy(basic_string_view{__first, __n}, std::move(__out_it));
|
||||
}
|
||||
|
||||
/// Transform wrapper.
|
||||
@ -132,15 +132,15 @@ __transform(const _CharT* __first,
|
||||
const _CharT* __last,
|
||||
output_iterator<const _OutCharT&> auto __out_it,
|
||||
_UnaryOperation __operation) -> decltype(__out_it) {
|
||||
if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
|
||||
__out_it.__get_container()->__transform(__first, __last, _VSTD::move(__operation));
|
||||
if constexpr (std::same_as<decltype(__out_it), std::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
|
||||
__out_it.__get_container()->__transform(__first, __last, std::move(__operation));
|
||||
return __out_it;
|
||||
} else if constexpr (_VSTD::same_as<decltype(__out_it),
|
||||
} else if constexpr (std::same_as<decltype(__out_it),
|
||||
typename __format::__retarget_buffer<_OutCharT>::__iterator>) {
|
||||
__out_it.__buffer_->__transform(__first, __last, _VSTD::move(__operation));
|
||||
__out_it.__buffer_->__transform(__first, __last, std::move(__operation));
|
||||
return __out_it;
|
||||
} else {
|
||||
return std::ranges::transform(__first, __last, _VSTD::move(__out_it), __operation).out;
|
||||
return std::ranges::transform(__first, __last, std::move(__out_it), __operation).out;
|
||||
}
|
||||
}
|
||||
|
||||
@ -149,14 +149,14 @@ __transform(const _CharT* __first,
|
||||
/// This uses a "mass output function" of __format::__output_buffer when possible.
|
||||
template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
|
||||
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, _CharT __value) {
|
||||
if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_CharT>>>) {
|
||||
if constexpr (std::same_as<decltype(__out_it), std::back_insert_iterator<__format::__output_buffer<_CharT>>>) {
|
||||
__out_it.__get_container()->__fill(__n, __value);
|
||||
return __out_it;
|
||||
} else if constexpr (_VSTD::same_as<decltype(__out_it), typename __format::__retarget_buffer<_CharT>::__iterator>) {
|
||||
} else if constexpr (std::same_as<decltype(__out_it), typename __format::__retarget_buffer<_CharT>::__iterator>) {
|
||||
__out_it.__buffer_->__fill(__n, __value);
|
||||
return __out_it;
|
||||
} else {
|
||||
return std::ranges::fill_n(_VSTD::move(__out_it), __n, __value);
|
||||
return std::ranges::fill_n(std::move(__out_it), __n, __value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,12 +228,12 @@ __write(basic_string_view<_CharT> __str,
|
||||
__format_spec::__parsed_specifications<_ParserCharT> __specs,
|
||||
ptrdiff_t __size) -> decltype(__out_it) {
|
||||
if (__size >= __specs.__width_)
|
||||
return __formatter::__copy(__str, _VSTD::move(__out_it));
|
||||
return __formatter::__copy(__str, std::move(__out_it));
|
||||
|
||||
__padding_size_result __padding = __formatter::__padding_size(__size, __specs.__width_, __specs.__std_.__alignment_);
|
||||
__out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
|
||||
__out_it = __formatter::__copy(__str, _VSTD::move(__out_it));
|
||||
return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
|
||||
__out_it = __formatter::__fill(std::move(__out_it), __padding.__before_, __specs.__fill_);
|
||||
__out_it = __formatter::__copy(__str, std::move(__out_it));
|
||||
return __formatter::__fill(std::move(__out_it), __padding.__after_, __specs.__fill_);
|
||||
}
|
||||
|
||||
template <contiguous_iterator _Iterator, class _ParserCharT>
|
||||
@ -244,7 +244,7 @@ __write(_Iterator __first,
|
||||
__format_spec::__parsed_specifications<_ParserCharT> __specs,
|
||||
ptrdiff_t __size) -> decltype(__out_it) {
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__first <= __last, "Not a valid range");
|
||||
return __formatter::__write(basic_string_view{__first, __last}, _VSTD::move(__out_it), __specs, __size);
|
||||
return __formatter::__write(basic_string_view{__first, __last}, std::move(__out_it), __specs, __size);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
@ -257,7 +257,7 @@ __write(_Iterator __first,
|
||||
output_iterator<const iter_value_t<_Iterator>&> auto __out_it,
|
||||
__format_spec::__parsed_specifications<_ParserCharT> __specs) -> decltype(__out_it) {
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__first <= __last, "Not a valid range");
|
||||
return __formatter::__write(__first, __last, _VSTD::move(__out_it), __specs, __last - __first);
|
||||
return __formatter::__write(__first, __last, std::move(__out_it), __specs, __last - __first);
|
||||
}
|
||||
|
||||
template <class _CharT, class _ParserCharT, class _UnaryOperation>
|
||||
@ -269,12 +269,12 @@ _LIBCPP_HIDE_FROM_ABI auto __write_transformed(const _CharT* __first, const _Cha
|
||||
|
||||
ptrdiff_t __size = __last - __first;
|
||||
if (__size >= __specs.__width_)
|
||||
return __formatter::__transform(__first, __last, _VSTD::move(__out_it), __op);
|
||||
return __formatter::__transform(__first, __last, std::move(__out_it), __op);
|
||||
|
||||
__padding_size_result __padding = __formatter::__padding_size(__size, __specs.__width_, __specs.__alignment_);
|
||||
__out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
|
||||
__out_it = __formatter::__transform(__first, __last, _VSTD::move(__out_it), __op);
|
||||
return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
|
||||
__out_it = __formatter::__fill(std::move(__out_it), __padding.__before_, __specs.__fill_);
|
||||
__out_it = __formatter::__transform(__first, __last, std::move(__out_it), __op);
|
||||
return __formatter::__fill(std::move(__out_it), __padding.__after_, __specs.__fill_);
|
||||
}
|
||||
|
||||
/// Writes a string using format's width estimation algorithm.
|
||||
@ -292,7 +292,7 @@ _LIBCPP_HIDE_FROM_ABI auto __write_string_no_precision(
|
||||
|
||||
// No padding -> copy the string
|
||||
if (!__specs.__has_width())
|
||||
return __formatter::__copy(__str, _VSTD::move(__out_it));
|
||||
return __formatter::__copy(__str, std::move(__out_it));
|
||||
|
||||
// Note when the estimated width is larger than size there's no padding. So
|
||||
// there's no reason to get the real size when the estimate is larger than or
|
||||
@ -300,7 +300,7 @@ _LIBCPP_HIDE_FROM_ABI auto __write_string_no_precision(
|
||||
size_t __size =
|
||||
__format_spec::__estimate_column_width(__str, __specs.__width_, __format_spec::__column_width_rounding::__up)
|
||||
.__width_;
|
||||
return __formatter::__write(__str, _VSTD::move(__out_it), __specs, __size);
|
||||
return __formatter::__write(__str, std::move(__out_it), __specs, __size);
|
||||
}
|
||||
|
||||
template <class _CharT>
|
||||
|
||||
@ -92,7 +92,7 @@ __substitute_arg_id(basic_format_arg<_Context> __format_arg) {
|
||||
// This means the 128-bit will not be valid anymore.
|
||||
// TODO FMT Verify this resolution is accepted and add a test to verify
|
||||
// 128-bit integrals fail and switch to visit_format_arg.
|
||||
return _VSTD::__visit_format_arg(
|
||||
return std::__visit_format_arg(
|
||||
[](auto __arg) -> uint32_t {
|
||||
using _Type = decltype(__arg);
|
||||
if constexpr (same_as<_Type, monostate>)
|
||||
@ -1158,7 +1158,7 @@ __estimate_column_width(basic_string_view<_CharT> __str, size_t __maximum, __col
|
||||
// When Unicode isn't supported assume ASCII and every code unit is one code
|
||||
// point. In ASCII the estimated column width is always one. Thus there's no
|
||||
// need for rounding.
|
||||
size_t __width_ = _VSTD::min(__str.size(), __maximum);
|
||||
size_t __width_ = std::min(__str.size(), __maximum);
|
||||
return {__width_, __str.begin() + __width_};
|
||||
}
|
||||
|
||||
|
||||
@ -47,11 +47,11 @@ _LIBCPP_HIDE_FROM_ABI auto __write_string(
|
||||
output_iterator<const _CharT&> auto __out_it,
|
||||
__format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
|
||||
if (!__specs.__has_precision())
|
||||
return __formatter::__write_string_no_precision(__str, _VSTD::move(__out_it), __specs);
|
||||
return __formatter::__write_string_no_precision(__str, std::move(__out_it), __specs);
|
||||
|
||||
int __size = __formatter::__truncate(__str, __specs.__precision_);
|
||||
|
||||
return __formatter::__write(__str.begin(), __str.end(), _VSTD::move(__out_it), __specs, __size);
|
||||
return __formatter::__write(__str.begin(), __str.end(), std::move(__out_it), __specs, __size);
|
||||
}
|
||||
|
||||
# endif // _LIBCPP_STD_VER >= 20
|
||||
@ -198,7 +198,7 @@ __format_escaped_char(_CharT __value,
|
||||
__str += _CharT('\'');
|
||||
__formatter::__escape(__str, basic_string_view{std::addressof(__value), 1}, __escape_quotation_mark::__apostrophe);
|
||||
__str += _CharT('\'');
|
||||
return __formatter::__write(__str.data(), __str.data() + __str.size(), _VSTD::move(__out_it), __specs, __str.size());
|
||||
return __formatter::__write(__str.data(), __str.data() + __str.size(), std::move(__out_it), __specs, __str.size());
|
||||
}
|
||||
|
||||
template <class _CharT>
|
||||
@ -210,7 +210,7 @@ __format_escaped_string(basic_string_view<_CharT> __values,
|
||||
__str += _CharT('"');
|
||||
__formatter::__escape(__str, __values, __escape_quotation_mark::__double_quote);
|
||||
__str += _CharT('"');
|
||||
return __formatter::__write_string(basic_string_view{__str}, _VSTD::move(__out_it), __specs);
|
||||
return __formatter::__write_string(basic_string_view{__str}, std::move(__out_it), __specs);
|
||||
}
|
||||
|
||||
# endif // _LIBCPP_STD_VER >= 23
|
||||
|
||||
@ -95,7 +95,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
typename __invoke_of<_Ti&, _Uj...>::type
|
||||
__mu_expand(_Ti& __ti, tuple<_Uj...>& __uj, __tuple_indices<_Indx...>)
|
||||
{
|
||||
return __ti(_VSTD::forward<_Uj>(_VSTD::get<_Indx>(__uj))...);
|
||||
return __ti(std::forward<_Uj>(std::get<_Indx>(__uj))...);
|
||||
}
|
||||
|
||||
template <class _Ti, class ..._Uj, __enable_if_t<is_bind_expression<_Ti>::value, int> = 0>
|
||||
@ -104,7 +104,7 @@ typename __invoke_of<_Ti&, _Uj...>::type
|
||||
__mu(_Ti& __ti, tuple<_Uj...>& __uj)
|
||||
{
|
||||
typedef typename __make_tuple_indices<sizeof...(_Uj)>::type __indices;
|
||||
return _VSTD::__mu_expand(__ti, __uj, __indices());
|
||||
return std::__mu_expand(__ti, __uj, __indices());
|
||||
}
|
||||
|
||||
template <bool IsPh, class _Ti, class _Uj>
|
||||
@ -122,7 +122,7 @@ typename __mu_return2<0 < is_placeholder<_Ti>::value, _Ti, _Uj>::type
|
||||
__mu(_Ti&, _Uj& __uj)
|
||||
{
|
||||
const size_t __indx = is_placeholder<_Ti>::value - 1;
|
||||
return _VSTD::forward<typename tuple_element<__indx, _Uj>::type>(_VSTD::get<__indx>(__uj));
|
||||
return std::forward<typename tuple_element<__indx, _Uj>::type>(std::get<__indx>(__uj));
|
||||
}
|
||||
|
||||
template <class _Ti, class _Uj, __enable_if_t<!is_bind_expression<_Ti>::value &&
|
||||
@ -245,7 +245,7 @@ typename __bind_return<_Fp, _BoundArgs, _Args>::type
|
||||
__apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
|
||||
_Args&& __args)
|
||||
{
|
||||
return _VSTD::__invoke(__f, _VSTD::__mu(_VSTD::get<_Indx>(__bound_args), __args)...);
|
||||
return std::__invoke(__f, std::__mu(std::get<_Indx>(__bound_args), __args)...);
|
||||
}
|
||||
|
||||
template<class _Fp, class ..._BoundArgs>
|
||||
@ -264,16 +264,16 @@ public:
|
||||
__enable_if_t<is_constructible<_Fd, _Gp>::value && !is_same<__libcpp_remove_reference_t<_Gp>, __bind>::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
explicit __bind(_Gp&& __f, _BA&& ...__bound_args)
|
||||
: __f_(_VSTD::forward<_Gp>(__f)),
|
||||
__bound_args_(_VSTD::forward<_BA>(__bound_args)...) {}
|
||||
: __f_(std::forward<_Gp>(__f)),
|
||||
__bound_args_(std::forward<_BA>(__bound_args)...) {}
|
||||
|
||||
template <class ..._Args>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type
|
||||
operator()(_Args&& ...__args)
|
||||
{
|
||||
return _VSTD::__apply_functor(__f_, __bound_args_, __indices(),
|
||||
tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...));
|
||||
return std::__apply_functor(__f_, __bound_args_, __indices(),
|
||||
tuple<_Args&&...>(std::forward<_Args>(__args)...));
|
||||
}
|
||||
|
||||
template <class ..._Args>
|
||||
@ -281,8 +281,8 @@ public:
|
||||
typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
|
||||
operator()(_Args&& ...__args) const
|
||||
{
|
||||
return _VSTD::__apply_functor(__f_, __bound_args_, __indices(),
|
||||
tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...));
|
||||
return std::__apply_functor(__f_, __bound_args_, __indices(),
|
||||
tuple<_Args&&...>(std::forward<_Args>(__args)...));
|
||||
}
|
||||
};
|
||||
|
||||
@ -304,8 +304,8 @@ public:
|
||||
__enable_if_t<is_constructible<_Fd, _Gp>::value && !is_same<__libcpp_remove_reference_t<_Gp>, __bind_r>::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
explicit __bind_r(_Gp&& __f, _BA&& ...__bound_args)
|
||||
: base(_VSTD::forward<_Gp>(__f),
|
||||
_VSTD::forward<_BA>(__bound_args)...) {}
|
||||
: base(std::forward<_Gp>(__f),
|
||||
std::forward<_BA>(__bound_args)...) {}
|
||||
|
||||
template <class ..._Args, __enable_if_t<is_convertible<typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type,
|
||||
result_type>::value || is_void<_Rp>::value, int> = 0>
|
||||
@ -314,7 +314,7 @@ public:
|
||||
operator()(_Args&& ...__args)
|
||||
{
|
||||
typedef __invoke_void_return_wrapper<_Rp> _Invoker;
|
||||
return _Invoker::__call(static_cast<base&>(*this), _VSTD::forward<_Args>(__args)...);
|
||||
return _Invoker::__call(static_cast<base&>(*this), std::forward<_Args>(__args)...);
|
||||
}
|
||||
|
||||
template <class ..._Args, __enable_if_t<is_convertible<typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type,
|
||||
@ -324,7 +324,7 @@ public:
|
||||
operator()(_Args&& ...__args) const
|
||||
{
|
||||
typedef __invoke_void_return_wrapper<_Rp> _Invoker;
|
||||
return _Invoker::__call(static_cast<base const&>(*this), _VSTD::forward<_Args>(__args)...);
|
||||
return _Invoker::__call(static_cast<base const&>(*this), std::forward<_Args>(__args)...);
|
||||
}
|
||||
};
|
||||
|
||||
@ -337,7 +337,7 @@ __bind<_Fp, _BoundArgs...>
|
||||
bind(_Fp&& __f, _BoundArgs&&... __bound_args)
|
||||
{
|
||||
typedef __bind<_Fp, _BoundArgs...> type;
|
||||
return type(_VSTD::forward<_Fp>(__f), _VSTD::forward<_BoundArgs>(__bound_args)...);
|
||||
return type(std::forward<_Fp>(__f), std::forward<_BoundArgs>(__bound_args)...);
|
||||
}
|
||||
|
||||
template<class _Rp, class _Fp, class ..._BoundArgs>
|
||||
@ -346,7 +346,7 @@ __bind_r<_Rp, _Fp, _BoundArgs...>
|
||||
bind(_Fp&& __f, _BoundArgs&&... __bound_args)
|
||||
{
|
||||
typedef __bind_r<_Rp, _Fp, _BoundArgs...> type;
|
||||
return type(_VSTD::forward<_Fp>(__f), _VSTD::forward<_BoundArgs>(__bound_args)...);
|
||||
return type(std::forward<_Fp>(__f), std::forward<_BoundArgs>(__bound_args)...);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
@ -33,9 +33,9 @@ template <size_t _NBound, size_t ..._Ip>
|
||||
struct __bind_back_op<_NBound, index_sequence<_Ip...>> {
|
||||
template <class _Fn, class _BoundArgs, class... _Args>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn&& __f, _BoundArgs&& __bound_args, _Args&&... __args) const
|
||||
noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_BoundArgs>(__bound_args))...)))
|
||||
-> decltype( _VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_BoundArgs>(__bound_args))...))
|
||||
{ return _VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_BoundArgs>(__bound_args))...); }
|
||||
noexcept(noexcept(std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)..., std::get<_Ip>(std::forward<_BoundArgs>(__bound_args))...)))
|
||||
-> decltype( std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)..., std::get<_Ip>(std::forward<_BoundArgs>(__bound_args))...))
|
||||
{ return std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)..., std::get<_Ip>(std::forward<_BoundArgs>(__bound_args))...); }
|
||||
};
|
||||
|
||||
template <class _Fn, class _BoundArgs>
|
||||
@ -48,9 +48,9 @@ template <class _Fn, class... _Args>
|
||||
(is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto __bind_back(_Fn&& __f, _Args&&... __args)
|
||||
noexcept(noexcept(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...))))
|
||||
-> decltype( __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)))
|
||||
{ return __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); }
|
||||
noexcept(noexcept(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...))))
|
||||
-> decltype( __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...)))
|
||||
{ return __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...)); }
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
|
||||
@ -32,9 +32,9 @@ struct __bind_front_op {
|
||||
template <class ..._Args>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto operator()(_Args&& ...__args) const
|
||||
noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Args>(__args)...)))
|
||||
-> decltype( _VSTD::invoke(_VSTD::forward<_Args>(__args)...))
|
||||
{ return _VSTD::invoke(_VSTD::forward<_Args>(__args)...); }
|
||||
noexcept(noexcept(std::invoke(std::forward<_Args>(__args)...)))
|
||||
-> decltype( std::invoke(std::forward<_Args>(__args)...))
|
||||
{ return std::invoke(std::forward<_Args>(__args)...); }
|
||||
};
|
||||
|
||||
template <class _Fn, class ..._BoundArgs>
|
||||
@ -47,7 +47,7 @@ template <class _Fn, class... _Args>
|
||||
(is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto bind_front(_Fn&& __f, _Args&&... __args) {
|
||||
return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);
|
||||
return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(std::forward<_Fn>(__f), std::forward<_Args>(__args)...);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
@ -28,9 +28,9 @@ struct __compose_op {
|
||||
template<class _Fn1, class _Fn2, class ..._Args>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto operator()(_Fn1&& __f1, _Fn2&& __f2, _Args&&... __args) const
|
||||
noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...))))
|
||||
-> decltype( _VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...)))
|
||||
{ return _VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...)); }
|
||||
noexcept(noexcept(std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...))))
|
||||
-> decltype( std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...)))
|
||||
{ return std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...)); }
|
||||
};
|
||||
|
||||
template <class _Fn1, class _Fn2>
|
||||
@ -41,9 +41,9 @@ struct __compose_t : __perfect_forward<__compose_op, _Fn1, _Fn2> {
|
||||
template <class _Fn1, class _Fn2>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto __compose(_Fn1&& __f1, _Fn2&& __f2)
|
||||
noexcept(noexcept(__compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2))))
|
||||
-> decltype( __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2)))
|
||||
{ return __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2)); }
|
||||
noexcept(noexcept(__compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2))))
|
||||
-> decltype( __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2)))
|
||||
{ return __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2)); }
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
|
||||
@ -162,29 +162,29 @@ class __alloc_func<_Fp, _Ap, _Rp(_ArgTypes...)>
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __alloc_func(_Target&& __f)
|
||||
: __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
|
||||
_VSTD::forward_as_tuple())
|
||||
: __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)),
|
||||
std::forward_as_tuple())
|
||||
{
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __alloc_func(const _Target& __f, const _Alloc& __a)
|
||||
: __f_(piecewise_construct, _VSTD::forward_as_tuple(__f),
|
||||
_VSTD::forward_as_tuple(__a))
|
||||
: __f_(piecewise_construct, std::forward_as_tuple(__f),
|
||||
std::forward_as_tuple(__a))
|
||||
{
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __alloc_func(const _Target& __f, _Alloc&& __a)
|
||||
: __f_(piecewise_construct, _VSTD::forward_as_tuple(__f),
|
||||
_VSTD::forward_as_tuple(_VSTD::move(__a)))
|
||||
: __f_(piecewise_construct, std::forward_as_tuple(__f),
|
||||
std::forward_as_tuple(std::move(__a)))
|
||||
{
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __alloc_func(_Target&& __f, _Alloc&& __a)
|
||||
: __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
|
||||
_VSTD::forward_as_tuple(_VSTD::move(__a)))
|
||||
: __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)),
|
||||
std::forward_as_tuple(std::move(__a)))
|
||||
{
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ class __alloc_func<_Fp, _Ap, _Rp(_ArgTypes...)>
|
||||
{
|
||||
typedef __invoke_void_return_wrapper<_Rp> _Invoker;
|
||||
return _Invoker::__call(__f_.first(),
|
||||
_VSTD::forward<_ArgTypes>(__arg)...);
|
||||
std::forward<_ArgTypes>(__arg)...);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
@ -231,7 +231,7 @@ public:
|
||||
const _Target& __target() const { return __f_; }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __default_alloc_func(_Target&& __f) : __f_(_VSTD::move(__f)) {}
|
||||
explicit __default_alloc_func(_Target&& __f) : __f_(std::move(__f)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __default_alloc_func(const _Target& __f) : __f_(__f) {}
|
||||
@ -239,7 +239,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_Rp operator()(_ArgTypes&&... __arg) {
|
||||
typedef __invoke_void_return_wrapper<_Rp> _Invoker;
|
||||
return _Invoker::__call(__f_, _VSTD::forward<_ArgTypes>(__arg)...);
|
||||
return _Invoker::__call(__f_, std::forward<_ArgTypes>(__arg)...);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
@ -296,7 +296,7 @@ class __func<_Fp, _Alloc, _Rp(_ArgTypes...)>
|
||||
public:
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __func(_Fp&& __f)
|
||||
: __f_(_VSTD::move(__f)) {}
|
||||
: __f_(std::move(__f)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __func(const _Fp& __f, const _Alloc& __a)
|
||||
@ -304,11 +304,11 @@ public:
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __func(const _Fp& __f, _Alloc&& __a)
|
||||
: __f_(__f, _VSTD::move(__a)) {}
|
||||
: __f_(__f, std::move(__a)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __func(_Fp&& __f, _Alloc&& __a)
|
||||
: __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
|
||||
: __f_(std::move(__f), std::move(__a)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual __base<_Rp(_ArgTypes...)>* __clone() const;
|
||||
_LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void __clone(__base<_Rp(_ArgTypes...)>*) const;
|
||||
@ -363,7 +363,7 @@ template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
|
||||
_Rp
|
||||
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::operator()(_ArgTypes&& ... __arg)
|
||||
{
|
||||
return __f_(_VSTD::forward<_ArgTypes>(__arg)...);
|
||||
return __f_(std::forward<_ArgTypes>(__arg)...);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RTTI
|
||||
@ -373,7 +373,7 @@ const void*
|
||||
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target(const type_info& __ti) const _NOEXCEPT
|
||||
{
|
||||
if (__ti == typeid(_Fp))
|
||||
return _VSTD::addressof(__f_.__target());
|
||||
return std::addressof(__f_.__target());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -424,13 +424,13 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
|
||||
is_nothrow_copy_constructible<_FunAlloc>::value)
|
||||
{
|
||||
__f_ =
|
||||
::new ((void*)&__buf_) _Fun(_VSTD::move(__f), _Alloc(__af));
|
||||
::new ((void*)&__buf_) _Fun(std::move(__f), _Alloc(__af));
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef __allocator_destructor<_FunAlloc> _Dp;
|
||||
unique_ptr<__func, _Dp> __hold(__af.allocate(1), _Dp(__af, 1));
|
||||
::new ((void*)__hold.get()) _Fun(_VSTD::move(__f), _Alloc(__a));
|
||||
::new ((void*)__hold.get()) _Fun(std::move(__f), _Alloc(__a));
|
||||
__f_ = __hold.release();
|
||||
}
|
||||
}
|
||||
@ -438,7 +438,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
|
||||
|
||||
template <class _Fp, __enable_if_t<!is_same<__decay_t<_Fp>, __value_func>::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI explicit __value_func(_Fp&& __f)
|
||||
: __value_func(_VSTD::forward<_Fp>(__f), allocator<_Fp>()) {}
|
||||
: __value_func(std::forward<_Fp>(__f), allocator<_Fp>()) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
__value_func(const __value_func& __f)
|
||||
@ -516,7 +516,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
|
||||
{
|
||||
if (__f_ == nullptr)
|
||||
__throw_bad_function_call();
|
||||
return (*__f_)(_VSTD::forward<_ArgTypes>(__args)...);
|
||||
return (*__f_)(std::forward<_ArgTypes>(__args)...);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
@ -556,7 +556,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
|
||||
__f_ = __as_base(&__buf_);
|
||||
}
|
||||
else
|
||||
_VSTD::swap(__f_, __f.__f_);
|
||||
std::swap(__f_, __f.__f_);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
@ -722,7 +722,7 @@ struct __policy_invoker<_Rp(_ArgTypes...)>
|
||||
_Fun* __f = reinterpret_cast<_Fun*>(__use_small_storage<_Fun>::value
|
||||
? &__buf->__small
|
||||
: __buf->__large);
|
||||
return (*__f)(_VSTD::forward<_ArgTypes>(__args)...);
|
||||
return (*__f)(std::forward<_ArgTypes>(__args)...);
|
||||
}
|
||||
};
|
||||
|
||||
@ -767,14 +767,14 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
|
||||
if (__use_small_storage<_Fun>())
|
||||
{
|
||||
::new ((void*)&__buf_.__small)
|
||||
_Fun(_VSTD::move(__f), _Alloc(__af));
|
||||
_Fun(std::move(__f), _Alloc(__af));
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef __allocator_destructor<_FunAlloc> _Dp;
|
||||
unique_ptr<_Fun, _Dp> __hold(__af.allocate(1), _Dp(__af, 1));
|
||||
::new ((void*)__hold.get())
|
||||
_Fun(_VSTD::move(__f), _Alloc(__af));
|
||||
_Fun(std::move(__f), _Alloc(__af));
|
||||
__buf_.__large = __hold.release();
|
||||
}
|
||||
}
|
||||
@ -789,11 +789,11 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
|
||||
__invoker_ = __invoker::template __create<_Fun>();
|
||||
__policy_ = __policy::__create<_Fun>();
|
||||
if (__use_small_storage<_Fun>()) {
|
||||
::new ((void*)&__buf_.__small) _Fun(_VSTD::move(__f));
|
||||
::new ((void*)&__buf_.__small) _Fun(std::move(__f));
|
||||
} else {
|
||||
__builtin_new_allocator::__holder_t __hold =
|
||||
__builtin_new_allocator::__allocate_type<_Fun>(1);
|
||||
__buf_.__large = ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f));
|
||||
__buf_.__large = ::new ((void*)__hold.get()) _Fun(std::move(__f));
|
||||
(void)__hold.release();
|
||||
}
|
||||
}
|
||||
@ -853,16 +853,16 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_Rp operator()(_ArgTypes&&... __args) const
|
||||
{
|
||||
return __invoker_.__call_(_VSTD::addressof(__buf_),
|
||||
_VSTD::forward<_ArgTypes>(__args)...);
|
||||
return __invoker_.__call_(std::addressof(__buf_),
|
||||
std::forward<_ArgTypes>(__args)...);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
void swap(__policy_func& __f)
|
||||
{
|
||||
_VSTD::swap(__invoker_, __f.__invoker_);
|
||||
_VSTD::swap(__policy_, __f.__policy_);
|
||||
_VSTD::swap(__buf_, __f.__buf_);
|
||||
std::swap(__invoker_, __f.__invoker_);
|
||||
std::swap(__policy_, __f.__policy_);
|
||||
std::swap(__buf_, __f.__buf_);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
@ -952,7 +952,7 @@ public:
|
||||
}
|
||||
|
||||
virtual _Rp operator()(_ArgTypes&& ... __arg) {
|
||||
return _VSTD::__invoke(__f_, _VSTD::forward<_ArgTypes>(__arg)...);
|
||||
return std::__invoke(__f_, std::forward<_ArgTypes>(__arg)...);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RTTI
|
||||
@ -1048,7 +1048,7 @@ public:
|
||||
template<class _Fp, class _Alloc>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
void assign(_Fp&& __f, const _Alloc& __a)
|
||||
{function(allocator_arg, __a, _VSTD::forward<_Fp>(__f)).swap(*this);}
|
||||
{function(allocator_arg, __a, std::forward<_Fp>(__f)).swap(*this);}
|
||||
#endif
|
||||
|
||||
// function capacity:
|
||||
@ -1098,26 +1098,26 @@ function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
|
||||
|
||||
template <class _Rp, class... _ArgTypes>
|
||||
function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT
|
||||
: __f_(_VSTD::move(__f.__f_)) {}
|
||||
: __f_(std::move(__f.__f_)) {}
|
||||
|
||||
#if _LIBCPP_STD_VER <= 14
|
||||
template<class _Rp, class ..._ArgTypes>
|
||||
template <class _Alloc>
|
||||
function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
|
||||
function&& __f)
|
||||
: __f_(_VSTD::move(__f.__f_)) {}
|
||||
: __f_(std::move(__f.__f_)) {}
|
||||
#endif
|
||||
|
||||
template <class _Rp, class... _ArgTypes>
|
||||
template <class _Fp, class>
|
||||
function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(_VSTD::move(__f)) {}
|
||||
function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(std::move(__f)) {}
|
||||
|
||||
#if _LIBCPP_STD_VER <= 14
|
||||
template <class _Rp, class... _ArgTypes>
|
||||
template <class _Fp, class _Alloc, class>
|
||||
function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc& __a,
|
||||
_Fp __f)
|
||||
: __f_(_VSTD::move(__f), __a) {}
|
||||
: __f_(std::move(__f), __a) {}
|
||||
#endif
|
||||
|
||||
template<class _Rp, class ..._ArgTypes>
|
||||
@ -1132,7 +1132,7 @@ template<class _Rp, class ..._ArgTypes>
|
||||
function<_Rp(_ArgTypes...)>&
|
||||
function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT
|
||||
{
|
||||
__f_ = _VSTD::move(__f.__f_);
|
||||
__f_ = std::move(__f.__f_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -1149,7 +1149,7 @@ template <class _Fp, class>
|
||||
function<_Rp(_ArgTypes...)>&
|
||||
function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f)
|
||||
{
|
||||
function(_VSTD::forward<_Fp>(__f)).swap(*this);
|
||||
function(std::forward<_Fp>(__f)).swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -1167,7 +1167,7 @@ template<class _Rp, class ..._ArgTypes>
|
||||
_Rp
|
||||
function<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __arg) const
|
||||
{
|
||||
return __f_(_VSTD::forward<_ArgTypes>(__arg)...);
|
||||
return __f_(std::forward<_ArgTypes>(__arg)...);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RTTI
|
||||
|
||||
@ -40,7 +40,7 @@ _Size
|
||||
__loadword(const void* __p)
|
||||
{
|
||||
_Size __r;
|
||||
_VSTD::memcpy(&__r, __p, sizeof(__r));
|
||||
std::memcpy(&__r, __p, sizeof(__r));
|
||||
return __r;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ struct __murmur2_or_cityhash<_Size, 64>
|
||||
__v = __weak_hash_len_32_with_seeds(__s, __v.second * __k1, __x + __w.first);
|
||||
__w = __weak_hash_len_32_with_seeds(__s + 32, __z + __w.second,
|
||||
__y + std::__loadword<_Size>(__s + 16));
|
||||
_VSTD::swap(__z, __x);
|
||||
std::swap(__z, __x);
|
||||
__s += 64;
|
||||
__len -= 64;
|
||||
} while (__len != 0);
|
||||
|
||||
@ -41,7 +41,7 @@ struct identity {
|
||||
template<class _Tp>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp&& operator()(_Tp&& __t) const noexcept
|
||||
{
|
||||
return _VSTD::forward<_Tp>(__t);
|
||||
return std::forward<_Tp>(__t);
|
||||
}
|
||||
|
||||
using is_transparent = void;
|
||||
|
||||
@ -27,7 +27,7 @@ _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...>)
|
||||
{
|
||||
return _VSTD::__invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);
|
||||
return std::__invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)...);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 17
|
||||
|
||||
@ -31,9 +31,9 @@ struct __not_fn_op {
|
||||
template <class... _Args>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 auto operator()(_Args&&... __args) const
|
||||
noexcept(noexcept(!_VSTD::invoke(_VSTD::forward<_Args>(__args)...)))
|
||||
-> decltype( !_VSTD::invoke(_VSTD::forward<_Args>(__args)...))
|
||||
{ return !_VSTD::invoke(_VSTD::forward<_Args>(__args)...); }
|
||||
noexcept(noexcept(!std::invoke(std::forward<_Args>(__args)...)))
|
||||
-> decltype( !std::invoke(std::forward<_Args>(__args)...))
|
||||
{ return !std::invoke(std::forward<_Args>(__args)...); }
|
||||
};
|
||||
|
||||
template <class _Fn>
|
||||
@ -47,7 +47,7 @@ template <class _Fn, class = enable_if_t<
|
||||
>>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 auto not_fn(_Fn&& __f) {
|
||||
return __not_fn_t<decay_t<_Fn>>(_VSTD::forward<_Fn>(__f));
|
||||
return __not_fn_t<decay_t<_Fn>>(std::forward<_Fn>(__f));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 17
|
||||
|
||||
@ -55,9 +55,9 @@ struct _LIBCPP_TEMPLATE_VIS plus<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) + std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) + std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) + std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -84,9 +84,9 @@ struct _LIBCPP_TEMPLATE_VIS minus<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) - std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) - std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) - std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -113,9 +113,9 @@ struct _LIBCPP_TEMPLATE_VIS multiplies<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) * std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) * std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) * std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -142,9 +142,9 @@ struct _LIBCPP_TEMPLATE_VIS divides<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) / std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) / std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) / std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -171,9 +171,9 @@ struct _LIBCPP_TEMPLATE_VIS modulus<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) % std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) % std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) % std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -200,9 +200,9 @@ struct _LIBCPP_TEMPLATE_VIS negate<void>
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_Tp&& __x) const
|
||||
noexcept(noexcept(- _VSTD::forward<_Tp>(__x)))
|
||||
-> decltype( - _VSTD::forward<_Tp>(__x))
|
||||
{ return - _VSTD::forward<_Tp>(__x); }
|
||||
noexcept(noexcept(- std::forward<_Tp>(__x)))
|
||||
-> decltype( - std::forward<_Tp>(__x))
|
||||
{ return - std::forward<_Tp>(__x); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -231,9 +231,9 @@ struct _LIBCPP_TEMPLATE_VIS bit_and<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) & std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) & std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) & std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -255,9 +255,9 @@ struct _LIBCPP_TEMPLATE_VIS bit_not<void>
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_Tp&& __x) const
|
||||
noexcept(noexcept(~_VSTD::forward<_Tp>(__x)))
|
||||
-> decltype( ~_VSTD::forward<_Tp>(__x))
|
||||
{ return ~_VSTD::forward<_Tp>(__x); }
|
||||
noexcept(noexcept(~std::forward<_Tp>(__x)))
|
||||
-> decltype( ~std::forward<_Tp>(__x))
|
||||
{ return ~std::forward<_Tp>(__x); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -284,9 +284,9 @@ struct _LIBCPP_TEMPLATE_VIS bit_or<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) | std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) | std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) | std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -313,9 +313,9 @@ struct _LIBCPP_TEMPLATE_VIS bit_xor<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) ^ std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) ^ std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) ^ std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -344,9 +344,9 @@ struct _LIBCPP_TEMPLATE_VIS equal_to<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) == std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) == std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) == std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -382,9 +382,9 @@ struct _LIBCPP_TEMPLATE_VIS not_equal_to<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) != std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) != std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) != std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -411,9 +411,9 @@ struct _LIBCPP_TEMPLATE_VIS less<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) < std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) < std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) < std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -440,9 +440,9 @@ struct _LIBCPP_TEMPLATE_VIS less_equal<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) <= std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) <= std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) <= std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -469,9 +469,9 @@ struct _LIBCPP_TEMPLATE_VIS greater_equal<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) >= std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) >= std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) >= std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -498,9 +498,9 @@ struct _LIBCPP_TEMPLATE_VIS greater<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) > std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) > std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) > std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -529,9 +529,9 @@ struct _LIBCPP_TEMPLATE_VIS logical_and<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) && std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) && std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) && std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -558,9 +558,9 @@ struct _LIBCPP_TEMPLATE_VIS logical_not<void>
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_Tp&& __x) const
|
||||
noexcept(noexcept(!_VSTD::forward<_Tp>(__x)))
|
||||
-> decltype( !_VSTD::forward<_Tp>(__x))
|
||||
{ return !_VSTD::forward<_Tp>(__x); }
|
||||
noexcept(noexcept(!std::forward<_Tp>(__x)))
|
||||
-> decltype( !std::forward<_Tp>(__x))
|
||||
{ return !std::forward<_Tp>(__x); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
@ -587,9 +587,9 @@ struct _LIBCPP_TEMPLATE_VIS logical_or<void>
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
noexcept(noexcept(_VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u)))
|
||||
-> decltype( _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u); }
|
||||
noexcept(noexcept(std::forward<_T1>(__t) || std::forward<_T2>(__u)))
|
||||
-> decltype( std::forward<_T1>(__t) || std::forward<_T2>(__u))
|
||||
{ return std::forward<_T1>(__t) || std::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -44,7 +44,7 @@ public:
|
||||
is_constructible_v<tuple<_BoundArgs...>, _Args&&...>
|
||||
>>
|
||||
_LIBCPP_HIDE_FROM_ABI explicit constexpr __perfect_forward_impl(_Args&&... __bound_args)
|
||||
: __bound_args_(_VSTD::forward<_Args>(__bound_args)...) {}
|
||||
: __bound_args_(std::forward<_Args>(__bound_args)...) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI __perfect_forward_impl(__perfect_forward_impl const&) = default;
|
||||
_LIBCPP_HIDE_FROM_ABI __perfect_forward_impl(__perfect_forward_impl&&) = default;
|
||||
@ -54,36 +54,36 @@ public:
|
||||
|
||||
template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs&..., _Args...>>>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) &
|
||||
noexcept(noexcept(_Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...)))
|
||||
-> decltype( _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...))
|
||||
{ return _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...); }
|
||||
noexcept(noexcept(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)))
|
||||
-> decltype( _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...))
|
||||
{ return _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...); }
|
||||
|
||||
template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs&..., _Args...>>>
|
||||
auto operator()(_Args&&...) & = delete;
|
||||
|
||||
template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs const&..., _Args...>>>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&
|
||||
noexcept(noexcept(_Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...)))
|
||||
-> decltype( _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...))
|
||||
{ return _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...); }
|
||||
noexcept(noexcept(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)))
|
||||
-> decltype( _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...))
|
||||
{ return _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...); }
|
||||
|
||||
template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs const&..., _Args...>>>
|
||||
auto operator()(_Args&&...) const& = delete;
|
||||
|
||||
template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs..., _Args...>>>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) &&
|
||||
noexcept(noexcept(_Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...)))
|
||||
-> decltype( _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...))
|
||||
{ return _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...); }
|
||||
noexcept(noexcept(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)))
|
||||
-> decltype( _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...))
|
||||
{ return _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...); }
|
||||
|
||||
template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs..., _Args...>>>
|
||||
auto operator()(_Args&&...) && = delete;
|
||||
|
||||
template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs const..., _Args...>>>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&&
|
||||
noexcept(noexcept(_Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...)))
|
||||
-> decltype( _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...))
|
||||
{ return _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...); }
|
||||
noexcept(noexcept(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)))
|
||||
-> decltype( _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...))
|
||||
{ return _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...); }
|
||||
|
||||
template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs const..., _Args...>>>
|
||||
auto operator()(_Args&&...) const&& = delete;
|
||||
|
||||
@ -31,8 +31,8 @@ struct equal_to {
|
||||
template <class _Tp, class _Up>
|
||||
requires equality_comparable_with<_Tp, _Up>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
|
||||
noexcept(noexcept(bool(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u)))) {
|
||||
return _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u);
|
||||
noexcept(noexcept(bool(std::forward<_Tp>(__t) == std::forward<_Up>(__u)))) {
|
||||
return std::forward<_Tp>(__t) == std::forward<_Up>(__u);
|
||||
}
|
||||
|
||||
using is_transparent = void;
|
||||
@ -42,8 +42,8 @@ struct not_equal_to {
|
||||
template <class _Tp, class _Up>
|
||||
requires equality_comparable_with<_Tp, _Up>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
|
||||
noexcept(noexcept(bool(!(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u))))) {
|
||||
return !(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u));
|
||||
noexcept(noexcept(bool(!(std::forward<_Tp>(__t) == std::forward<_Up>(__u))))) {
|
||||
return !(std::forward<_Tp>(__t) == std::forward<_Up>(__u));
|
||||
}
|
||||
|
||||
using is_transparent = void;
|
||||
@ -53,8 +53,8 @@ struct less {
|
||||
template <class _Tp, class _Up>
|
||||
requires totally_ordered_with<_Tp, _Up>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
|
||||
noexcept(noexcept(bool(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u)))) {
|
||||
return _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u);
|
||||
noexcept(noexcept(bool(std::forward<_Tp>(__t) < std::forward<_Up>(__u)))) {
|
||||
return std::forward<_Tp>(__t) < std::forward<_Up>(__u);
|
||||
}
|
||||
|
||||
using is_transparent = void;
|
||||
@ -64,8 +64,8 @@ struct less_equal {
|
||||
template <class _Tp, class _Up>
|
||||
requires totally_ordered_with<_Tp, _Up>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
|
||||
noexcept(noexcept(bool(!(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t))))) {
|
||||
return !(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t));
|
||||
noexcept(noexcept(bool(!(std::forward<_Up>(__u) < std::forward<_Tp>(__t))))) {
|
||||
return !(std::forward<_Up>(__u) < std::forward<_Tp>(__t));
|
||||
}
|
||||
|
||||
using is_transparent = void;
|
||||
@ -75,8 +75,8 @@ struct greater {
|
||||
template <class _Tp, class _Up>
|
||||
requires totally_ordered_with<_Tp, _Up>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
|
||||
noexcept(noexcept(bool(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t)))) {
|
||||
return _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t);
|
||||
noexcept(noexcept(bool(std::forward<_Up>(__u) < std::forward<_Tp>(__t)))) {
|
||||
return std::forward<_Up>(__u) < std::forward<_Tp>(__t);
|
||||
}
|
||||
|
||||
using is_transparent = void;
|
||||
@ -86,8 +86,8 @@ struct greater_equal {
|
||||
template <class _Tp, class _Up>
|
||||
requires totally_ordered_with<_Tp, _Up>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
|
||||
noexcept(noexcept(bool(!(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u))))) {
|
||||
return !(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u));
|
||||
noexcept(noexcept(bool(!(std::forward<_Tp>(__t) < std::forward<_Up>(__u))))) {
|
||||
return !(std::forward<_Tp>(__t) < std::forward<_Up>(__u));
|
||||
}
|
||||
|
||||
using is_transparent = void;
|
||||
|
||||
@ -42,7 +42,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(std::declval<_Up>()))) {
|
||||
type& __f = static_cast<_Up&&>(__u);
|
||||
__f_ = _VSTD::addressof(__f);
|
||||
__f_ = std::addressof(__f);
|
||||
}
|
||||
|
||||
// access
|
||||
|
||||
@ -286,7 +286,7 @@ struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const volatile>
|
||||
template <class _Tp, class ..._Args>
|
||||
struct __invoke_return
|
||||
{
|
||||
typedef decltype(_VSTD::__invoke(std::declval<_Tp>(), std::declval<_Args>()...)) type;
|
||||
typedef decltype(std::__invoke(std::declval<_Tp>(), std::declval<_Args>()...)) type;
|
||||
};
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
@ -199,11 +199,11 @@ struct __hash_key_value_types {
|
||||
}
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
static __container_value_type* __get_ptr(__node_value_type& __n) {
|
||||
return _VSTD::addressof(__n);
|
||||
return std::addressof(__n);
|
||||
}
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
static __container_value_type&& __move(__node_value_type& __v) {
|
||||
return _VSTD::move(__v);
|
||||
return std::move(__v);
|
||||
}
|
||||
};
|
||||
|
||||
@ -237,7 +237,7 @@ struct __hash_key_value_types<__hash_value_type<_Key, _Tp> > {
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
static __container_value_type* __get_ptr(__node_value_type& __n) {
|
||||
return _VSTD::addressof(__n.__get_value());
|
||||
return std::addressof(__n.__get_value());
|
||||
}
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) {
|
||||
@ -643,7 +643,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
__bucket_list_deallocator(__bucket_list_deallocator&& __x)
|
||||
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
|
||||
: __data_(_VSTD::move(__x.__data_))
|
||||
: __data_(std::move(__x.__data_))
|
||||
{
|
||||
__x.size() = 0;
|
||||
}
|
||||
@ -889,7 +889,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
size_type max_size() const _NOEXCEPT
|
||||
{
|
||||
return _VSTD::min<size_type>(
|
||||
return std::min<size_type>(
|
||||
__node_traits::max_size(__node_alloc()),
|
||||
numeric_limits<difference_type >::max()
|
||||
);
|
||||
@ -929,7 +929,7 @@ public:
|
||||
template <class _Pp>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
pair<iterator, bool> __emplace_unique(_Pp&& __x) {
|
||||
return __emplace_unique_extract_key(_VSTD::forward<_Pp>(__x),
|
||||
return __emplace_unique_extract_key(std::forward<_Pp>(__x),
|
||||
__can_extract_key<_Pp, key_type>());
|
||||
}
|
||||
|
||||
@ -938,33 +938,33 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
pair<iterator, bool>
|
||||
__emplace_unique(_First&& __f, _Second&& __s) {
|
||||
return __emplace_unique_key_args(__f, _VSTD::forward<_First>(__f),
|
||||
_VSTD::forward<_Second>(__s));
|
||||
return __emplace_unique_key_args(__f, std::forward<_First>(__f),
|
||||
std::forward<_Second>(__s));
|
||||
}
|
||||
|
||||
template <class... _Args>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
pair<iterator, bool> __emplace_unique(_Args&&... __args) {
|
||||
return __emplace_unique_impl(_VSTD::forward<_Args>(__args)...);
|
||||
return __emplace_unique_impl(std::forward<_Args>(__args)...);
|
||||
}
|
||||
|
||||
template <class _Pp>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
pair<iterator, bool>
|
||||
__emplace_unique_extract_key(_Pp&& __x, __extract_key_fail_tag) {
|
||||
return __emplace_unique_impl(_VSTD::forward<_Pp>(__x));
|
||||
return __emplace_unique_impl(std::forward<_Pp>(__x));
|
||||
}
|
||||
template <class _Pp>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
pair<iterator, bool>
|
||||
__emplace_unique_extract_key(_Pp&& __x, __extract_key_self_tag) {
|
||||
return __emplace_unique_key_args(__x, _VSTD::forward<_Pp>(__x));
|
||||
return __emplace_unique_key_args(__x, std::forward<_Pp>(__x));
|
||||
}
|
||||
template <class _Pp>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
pair<iterator, bool>
|
||||
__emplace_unique_extract_key(_Pp&& __x, __extract_key_first_tag) {
|
||||
return __emplace_unique_key_args(__x.first, _VSTD::forward<_Pp>(__x));
|
||||
return __emplace_unique_key_args(__x.first, std::forward<_Pp>(__x));
|
||||
}
|
||||
|
||||
template <class... _Args>
|
||||
@ -978,25 +978,25 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
pair<iterator, bool>
|
||||
__insert_unique(__container_value_type&& __x) {
|
||||
return __emplace_unique_key_args(_NodeTypes::__get_key(__x), _VSTD::move(__x));
|
||||
return __emplace_unique_key_args(_NodeTypes::__get_key(__x), std::move(__x));
|
||||
}
|
||||
|
||||
template <class _Pp, class = __enable_if_t<!__is_same_uncvref<_Pp, __container_value_type>::value> >
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
pair<iterator, bool> __insert_unique(_Pp&& __x) {
|
||||
return __emplace_unique(_VSTD::forward<_Pp>(__x));
|
||||
return __emplace_unique(std::forward<_Pp>(__x));
|
||||
}
|
||||
|
||||
template <class _Pp>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
iterator __insert_multi(_Pp&& __x) {
|
||||
return __emplace_multi(_VSTD::forward<_Pp>(__x));
|
||||
return __emplace_multi(std::forward<_Pp>(__x));
|
||||
}
|
||||
|
||||
template <class _Pp>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
iterator __insert_multi(const_iterator __p, _Pp&& __x) {
|
||||
return __emplace_hint_multi(__p, _VSTD::forward<_Pp>(__x));
|
||||
return __emplace_hint_multi(__p, std::forward<_Pp>(__x));
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
@ -1132,7 +1132,7 @@ public:
|
||||
{
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__mlf > 0,
|
||||
"unordered container::max_load_factor(lf) called with lf <= 0");
|
||||
max_load_factor() = _VSTD::max(__mlf, load_factor());
|
||||
max_load_factor() = std::max(__mlf, load_factor());
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
@ -1213,8 +1213,8 @@ private:
|
||||
is_nothrow_move_assignable<__node_allocator>::value)
|
||||
{
|
||||
__bucket_list_.get_deleter().__alloc() =
|
||||
_VSTD::move(__u.__bucket_list_.get_deleter().__alloc());
|
||||
__node_alloc() = _VSTD::move(__u.__node_alloc());
|
||||
std::move(__u.__bucket_list_.get_deleter().__alloc());
|
||||
__node_alloc() = std::move(__u.__node_alloc());
|
||||
}
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
void __move_assign_alloc(__hash_table&, false_type) _NOEXCEPT {}
|
||||
@ -1302,10 +1302,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
|
||||
is_nothrow_move_constructible<__node_allocator>::value &&
|
||||
is_nothrow_move_constructible<hasher>::value &&
|
||||
is_nothrow_move_constructible<key_equal>::value)
|
||||
: __bucket_list_(_VSTD::move(__u.__bucket_list_)),
|
||||
__p1_(_VSTD::move(__u.__p1_)),
|
||||
__p2_(_VSTD::move(__u.__p2_)),
|
||||
__p3_(_VSTD::move(__u.__p3_))
|
||||
: __bucket_list_(std::move(__u.__bucket_list_)),
|
||||
__p1_(std::move(__u.__p1_)),
|
||||
__p2_(std::move(__u.__p2_)),
|
||||
__p3_(std::move(__u.__p3_))
|
||||
{
|
||||
if (size() > 0)
|
||||
{
|
||||
@ -1321,8 +1321,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
|
||||
const allocator_type& __a)
|
||||
: __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
|
||||
__p1_(__default_init_tag(), __node_allocator(__a)),
|
||||
__p2_(0, _VSTD::move(__u.hash_function())),
|
||||
__p3_(_VSTD::move(__u.__p3_))
|
||||
__p2_(0, std::move(__u.hash_function())),
|
||||
__p3_(std::move(__u.__p3_))
|
||||
{
|
||||
if (__a == allocator_type(__u.__node_alloc()))
|
||||
{
|
||||
@ -1373,7 +1373,7 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>&
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(const __hash_table& __u)
|
||||
{
|
||||
if (this != _VSTD::addressof(__u))
|
||||
if (this != std::addressof(__u))
|
||||
{
|
||||
__copy_assign_alloc(__u);
|
||||
hash_function() = __u.hash_function();
|
||||
@ -1429,9 +1429,9 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
|
||||
__u.__bucket_list_.get_deleter().size() = 0;
|
||||
__move_assign_alloc(__u);
|
||||
size() = __u.size();
|
||||
hash_function() = _VSTD::move(__u.hash_function());
|
||||
hash_function() = std::move(__u.hash_function());
|
||||
max_load_factor() = __u.max_load_factor();
|
||||
key_eq() = _VSTD::move(__u.key_eq());
|
||||
key_eq() = std::move(__u.key_eq());
|
||||
__p1_.first().__next_ = __u.__p1_.first().__next_;
|
||||
if (size() > 0)
|
||||
{
|
||||
@ -1451,8 +1451,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
|
||||
__move_assign(__u, true_type());
|
||||
else
|
||||
{
|
||||
hash_function() = _VSTD::move(__u.hash_function());
|
||||
key_eq() = _VSTD::move(__u.key_eq());
|
||||
hash_function() = std::move(__u.hash_function());
|
||||
key_eq() = std::move(__u.key_eq());
|
||||
max_load_factor() = __u.max_load_factor();
|
||||
if (bucket_count() != 0)
|
||||
{
|
||||
@ -1465,7 +1465,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
|
||||
while (__cache != nullptr && __u.size() != 0)
|
||||
{
|
||||
__cache->__upcast()->__get_value() =
|
||||
_VSTD::move(__u.remove(__i++)->__get_value());
|
||||
std::move(__u.remove(__i++)->__get_value());
|
||||
__next_pointer __next = __cache->__next_;
|
||||
__node_insert_multi(__cache->__upcast());
|
||||
__cache = __next;
|
||||
@ -1666,7 +1666,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_prepare(
|
||||
}
|
||||
if (size()+1 > __bc * max_load_factor() || __bc == 0)
|
||||
{
|
||||
__rehash_unique(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
|
||||
__rehash_unique(std::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
|
||||
size_type(std::ceil(float(size() + 1) / max_load_factor()))));
|
||||
}
|
||||
return nullptr;
|
||||
@ -1738,7 +1738,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi_prepare(
|
||||
size_type __bc = bucket_count();
|
||||
if (size()+1 > __bc * max_load_factor() || __bc == 0)
|
||||
{
|
||||
__rehash_multi(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
|
||||
__rehash_multi(std::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
|
||||
size_type(std::ceil(float(size() + 1) / max_load_factor()))));
|
||||
__bc = bucket_count();
|
||||
}
|
||||
@ -1829,7 +1829,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(
|
||||
size_type __bc = bucket_count();
|
||||
if (size()+1 > __bc * max_load_factor() || __bc == 0)
|
||||
{
|
||||
__rehash_multi(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
|
||||
__rehash_multi(std::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
|
||||
size_type(std::ceil(float(size() + 1) / max_load_factor()))));
|
||||
__bc = bucket_count();
|
||||
}
|
||||
@ -1875,10 +1875,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const&
|
||||
}
|
||||
}
|
||||
{
|
||||
__node_holder __h = __construct_node_hash(__hash, _VSTD::forward<_Args>(__args)...);
|
||||
__node_holder __h = __construct_node_hash(__hash, std::forward<_Args>(__args)...);
|
||||
if (size()+1 > __bc * max_load_factor() || __bc == 0)
|
||||
{
|
||||
__rehash_unique(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
|
||||
__rehash_unique(std::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
|
||||
size_type(std::ceil(float(size() + 1) / max_load_factor()))));
|
||||
__bc = bucket_count();
|
||||
__chash = std::__constrain_hash(__hash, __bc);
|
||||
@ -1915,7 +1915,7 @@ template <class... _Args>
|
||||
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_impl(_Args&&... __args)
|
||||
{
|
||||
__node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
|
||||
__node_holder __h = __construct_node(std::forward<_Args>(__args)...);
|
||||
pair<iterator, bool> __r = __node_insert_unique(__h.get());
|
||||
if (__r.second)
|
||||
__h.release();
|
||||
@ -1927,7 +1927,7 @@ template <class... _Args>
|
||||
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_multi(_Args&&... __args)
|
||||
{
|
||||
__node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
|
||||
__node_holder __h = __construct_node(std::forward<_Args>(__args)...);
|
||||
iterator __r = __node_insert_multi(__h.get());
|
||||
__h.release();
|
||||
return __r;
|
||||
@ -1939,7 +1939,7 @@ typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi(
|
||||
const_iterator __p, _Args&&... __args)
|
||||
{
|
||||
__node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
|
||||
__node_holder __h = __construct_node(std::forward<_Args>(__args)...);
|
||||
iterator __r = __node_insert_multi(__p, __h.get());
|
||||
__h.release();
|
||||
return __r;
|
||||
@ -1958,7 +1958,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
|
||||
pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
|
||||
if (__result.second)
|
||||
__nh.__release_ptr();
|
||||
return _InsertReturnType{__result.first, __result.second, _VSTD::move(__nh)};
|
||||
return _InsertReturnType{__result.first, __result.second, std::move(__nh)};
|
||||
}
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
@ -2092,7 +2092,7 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
|
||||
__do_rehash<_UniqueKeys>(__n);
|
||||
else if (__n < __bc)
|
||||
{
|
||||
__n = _VSTD::max<size_type>
|
||||
__n = std::max<size_type>
|
||||
(
|
||||
__n,
|
||||
std::__is_hash_power2(__bc) ? std::__next_hash_pow2(size_t(std::ceil(float(size()) / max_load_factor()))) :
|
||||
@ -2233,7 +2233,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(_Args&& ...__args)
|
||||
std::__construct_at(std::addressof(*__h), /* next = */nullptr, /* hash = */0);
|
||||
|
||||
// Now construct the value_type using the allocator's construct() method.
|
||||
__node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__get_value()), _VSTD::forward<_Args>(__args)...);
|
||||
__node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__get_value()), std::forward<_Args>(__args)...);
|
||||
__h.get_deleter().__value_constructed = true;
|
||||
|
||||
__h->__hash_ = hash_function()(__h->__get_value());
|
||||
@ -2252,8 +2252,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node_hash(
|
||||
__node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
|
||||
std::__construct_at(std::addressof(*__h), /* next = */nullptr, /* hash = */__hash);
|
||||
__node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__get_value()),
|
||||
_VSTD::forward<_First>(__f),
|
||||
_VSTD::forward<_Rest>(__rest)...);
|
||||
std::forward<_First>(__f),
|
||||
std::forward<_Rest>(__rest)...);
|
||||
__h.get_deleter().__value_constructed = true;
|
||||
return __h;
|
||||
}
|
||||
@ -2472,11 +2472,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
|
||||
__bucket_list_.reset(__u.__bucket_list_.release());
|
||||
__u.__bucket_list_.reset(__npp);
|
||||
}
|
||||
_VSTD::swap(__bucket_list_.get_deleter().size(), __u.__bucket_list_.get_deleter().size());
|
||||
_VSTD::__swap_allocator(__bucket_list_.get_deleter().__alloc(),
|
||||
std::swap(__bucket_list_.get_deleter().size(), __u.__bucket_list_.get_deleter().size());
|
||||
std::__swap_allocator(__bucket_list_.get_deleter().__alloc(),
|
||||
__u.__bucket_list_.get_deleter().__alloc());
|
||||
_VSTD::__swap_allocator(__node_alloc(), __u.__node_alloc());
|
||||
_VSTD::swap(__p1_.first().__next_, __u.__p1_.first().__next_);
|
||||
std::__swap_allocator(__node_alloc(), __u.__node_alloc());
|
||||
std::swap(__p1_.first().__next_, __u.__p1_.first().__next_);
|
||||
__p2_.swap(__u.__p2_);
|
||||
__p3_.swap(__u.__p3_);
|
||||
if (size() > 0)
|
||||
|
||||
@ -60,15 +60,15 @@ void __advance(_RandIter& __i, typename iterator_traits<_RandIter>::difference_t
|
||||
|
||||
template <
|
||||
class _InputIter, class _Distance,
|
||||
class _IntegralDistance = decltype(_VSTD::__convert_to_integral(std::declval<_Distance>())),
|
||||
class _IntegralDistance = decltype(std::__convert_to_integral(std::declval<_Distance>())),
|
||||
class = __enable_if_t<is_integral<_IntegralDistance>::value> >
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
void advance(_InputIter& __i, _Distance __orig_n) {
|
||||
typedef typename iterator_traits<_InputIter>::difference_type _Difference;
|
||||
_Difference __n = static_cast<_Difference>(_VSTD::__convert_to_integral(__orig_n));
|
||||
_Difference __n = static_cast<_Difference>(std::__convert_to_integral(__orig_n));
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
|
||||
"Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
|
||||
_VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
|
||||
std::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
|
||||
}
|
||||
|
||||
#if _LIBCPP_STD_VER >= 20
|
||||
@ -128,7 +128,7 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Ip& __i, _Sp __bound_sentinel) const {
|
||||
// If `I` and `S` model `assignable_from<I&, S>`, equivalent to `i = std::move(bound_sentinel)`.
|
||||
if constexpr (assignable_from<_Ip&, _Sp>) {
|
||||
__i = _VSTD::move(__bound_sentinel);
|
||||
__i = std::move(__bound_sentinel);
|
||||
}
|
||||
// Otherwise, if `S` and `I` model `sized_sentinel_for<S, I>`, equivalent to `ranges::advance(i, bound_sentinel - i)`.
|
||||
else if constexpr (sized_sentinel_for<_Sp, _Ip>) {
|
||||
|
||||
@ -48,12 +48,12 @@ public:
|
||||
typedef void reference;
|
||||
typedef _Container container_type;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit back_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit back_insert_iterator(_Container& __x) : container(std::addressof(__x)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator=(const typename _Container::value_type& __value)
|
||||
{container->push_back(__value); return *this;}
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator=(typename _Container::value_type&& __value)
|
||||
{container->push_back(_VSTD::move(__value)); return *this;}
|
||||
{container->push_back(std::move(__value)); return *this;}
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator*() {return *this;}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator++() {return *this;}
|
||||
|
||||
@ -51,7 +51,7 @@ template<input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent>
|
||||
class common_iterator {
|
||||
struct __proxy {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr const iter_value_t<_Iter>* operator->() const noexcept {
|
||||
return _VSTD::addressof(__value_);
|
||||
return std::addressof(__value_);
|
||||
}
|
||||
iter_value_t<_Iter> __value_;
|
||||
};
|
||||
@ -71,8 +71,8 @@ class common_iterator {
|
||||
public:
|
||||
_LIBCPP_HIDE_FROM_ABI common_iterator() requires default_initializable<_Iter> = default;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr common_iterator(_Iter __i) : __hold_(in_place_type<_Iter>, _VSTD::move(__i)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr common_iterator(_Sent __s) : __hold_(in_place_type<_Sent>, _VSTD::move(__s)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr common_iterator(_Iter __i) : __hold_(in_place_type<_Iter>, std::move(__i)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr common_iterator(_Sent __s) : __hold_(in_place_type<_Sent>, std::move(__s)) {}
|
||||
|
||||
template<class _I2, class _S2>
|
||||
requires convertible_to<const _I2&, _Iter> && convertible_to<const _S2&, _Sent>
|
||||
@ -81,8 +81,8 @@ public:
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(!__other.__hold_.valueless_by_exception(),
|
||||
"Attempted to construct from a valueless common_iterator");
|
||||
if (__other.__hold_.index() == 0)
|
||||
return variant<_Iter, _Sent>{in_place_index<0>, _VSTD::__unchecked_get<0>(__other.__hold_)};
|
||||
return variant<_Iter, _Sent>{in_place_index<1>, _VSTD::__unchecked_get<1>(__other.__hold_)};
|
||||
return variant<_Iter, _Sent>{in_place_index<0>, std::__unchecked_get<0>(__other.__hold_)};
|
||||
return variant<_Iter, _Sent>{in_place_index<1>, std::__unchecked_get<1>(__other.__hold_)};
|
||||
}()) {}
|
||||
|
||||
template<class _I2, class _S2>
|
||||
@ -97,15 +97,15 @@ public:
|
||||
|
||||
// If they're the same index, just assign.
|
||||
if (__idx == 0 && __other_idx == 0)
|
||||
_VSTD::__unchecked_get<0>(__hold_) = _VSTD::__unchecked_get<0>(__other.__hold_);
|
||||
std::__unchecked_get<0>(__hold_) = std::__unchecked_get<0>(__other.__hold_);
|
||||
else if (__idx == 1 && __other_idx == 1)
|
||||
_VSTD::__unchecked_get<1>(__hold_) = _VSTD::__unchecked_get<1>(__other.__hold_);
|
||||
std::__unchecked_get<1>(__hold_) = std::__unchecked_get<1>(__other.__hold_);
|
||||
|
||||
// Otherwise replace with the oposite element.
|
||||
else if (__other_idx == 1)
|
||||
__hold_.template emplace<1>(_VSTD::__unchecked_get<1>(__other.__hold_));
|
||||
__hold_.template emplace<1>(std::__unchecked_get<1>(__other.__hold_));
|
||||
else if (__other_idx == 0)
|
||||
__hold_.template emplace<0>(_VSTD::__unchecked_get<0>(__other.__hold_));
|
||||
__hold_.template emplace<0>(std::__unchecked_get<0>(__other.__hold_));
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -114,7 +114,7 @@ public:
|
||||
{
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
|
||||
"Attempted to dereference a non-dereferenceable common_iterator");
|
||||
return *_VSTD::__unchecked_get<_Iter>(__hold_);
|
||||
return *std::__unchecked_get<_Iter>(__hold_);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*() const
|
||||
@ -122,7 +122,7 @@ public:
|
||||
{
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
|
||||
"Attempted to dereference a non-dereferenceable common_iterator");
|
||||
return *_VSTD::__unchecked_get<_Iter>(__hold_);
|
||||
return *std::__unchecked_get<_Iter>(__hold_);
|
||||
}
|
||||
|
||||
template<class _I2 = _Iter>
|
||||
@ -135,19 +135,19 @@ public:
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
|
||||
"Attempted to dereference a non-dereferenceable common_iterator");
|
||||
if constexpr (is_pointer_v<_Iter> || requires(const _Iter& __i) { __i.operator->(); }) {
|
||||
return _VSTD::__unchecked_get<_Iter>(__hold_);
|
||||
return std::__unchecked_get<_Iter>(__hold_);
|
||||
} else if constexpr (is_reference_v<iter_reference_t<_Iter>>) {
|
||||
auto&& __tmp = *_VSTD::__unchecked_get<_Iter>(__hold_);
|
||||
return _VSTD::addressof(__tmp);
|
||||
auto&& __tmp = *std::__unchecked_get<_Iter>(__hold_);
|
||||
return std::addressof(__tmp);
|
||||
} else {
|
||||
return __proxy{*_VSTD::__unchecked_get<_Iter>(__hold_)};
|
||||
return __proxy{*std::__unchecked_get<_Iter>(__hold_)};
|
||||
}
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI common_iterator& operator++() {
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
|
||||
"Attempted to increment a non-dereferenceable common_iterator");
|
||||
++_VSTD::__unchecked_get<_Iter>(__hold_); return *this;
|
||||
++std::__unchecked_get<_Iter>(__hold_); return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI decltype(auto) operator++(int) {
|
||||
@ -159,7 +159,7 @@ public:
|
||||
return __tmp;
|
||||
} else if constexpr (requires (_Iter& __i) { { *__i++ } -> __can_reference; } ||
|
||||
!__can_use_postfix_proxy<_Iter>) {
|
||||
return _VSTD::__unchecked_get<_Iter>(__hold_)++;
|
||||
return std::__unchecked_get<_Iter>(__hold_)++;
|
||||
} else {
|
||||
auto __p = __postfix_proxy{**this};
|
||||
++*this;
|
||||
@ -183,9 +183,9 @@ public:
|
||||
return true;
|
||||
|
||||
if (__x_index == 0)
|
||||
return _VSTD::__unchecked_get<_Iter>(__x.__hold_) == _VSTD::__unchecked_get<_S2>(__y.__hold_);
|
||||
return std::__unchecked_get<_Iter>(__x.__hold_) == std::__unchecked_get<_S2>(__y.__hold_);
|
||||
|
||||
return _VSTD::__unchecked_get<_Sent>(__x.__hold_) == _VSTD::__unchecked_get<_I2>(__y.__hold_);
|
||||
return std::__unchecked_get<_Sent>(__x.__hold_) == std::__unchecked_get<_I2>(__y.__hold_);
|
||||
}
|
||||
|
||||
template<class _I2, sentinel_for<_Iter> _S2>
|
||||
@ -204,12 +204,12 @@ public:
|
||||
return true;
|
||||
|
||||
if (__x_index == 0 && __y_index == 0)
|
||||
return _VSTD::__unchecked_get<_Iter>(__x.__hold_) == _VSTD::__unchecked_get<_I2>(__y.__hold_);
|
||||
return std::__unchecked_get<_Iter>(__x.__hold_) == std::__unchecked_get<_I2>(__y.__hold_);
|
||||
|
||||
if (__x_index == 0)
|
||||
return _VSTD::__unchecked_get<_Iter>(__x.__hold_) == _VSTD::__unchecked_get<_S2>(__y.__hold_);
|
||||
return std::__unchecked_get<_Iter>(__x.__hold_) == std::__unchecked_get<_S2>(__y.__hold_);
|
||||
|
||||
return _VSTD::__unchecked_get<_Sent>(__x.__hold_) == _VSTD::__unchecked_get<_I2>(__y.__hold_);
|
||||
return std::__unchecked_get<_Sent>(__x.__hold_) == std::__unchecked_get<_I2>(__y.__hold_);
|
||||
}
|
||||
|
||||
template<sized_sentinel_for<_Iter> _I2, sized_sentinel_for<_Iter> _S2>
|
||||
@ -228,12 +228,12 @@ public:
|
||||
return 0;
|
||||
|
||||
if (__x_index == 0 && __y_index == 0)
|
||||
return _VSTD::__unchecked_get<_Iter>(__x.__hold_) - _VSTD::__unchecked_get<_I2>(__y.__hold_);
|
||||
return std::__unchecked_get<_Iter>(__x.__hold_) - std::__unchecked_get<_I2>(__y.__hold_);
|
||||
|
||||
if (__x_index == 0)
|
||||
return _VSTD::__unchecked_get<_Iter>(__x.__hold_) - _VSTD::__unchecked_get<_S2>(__y.__hold_);
|
||||
return std::__unchecked_get<_Iter>(__x.__hold_) - std::__unchecked_get<_S2>(__y.__hold_);
|
||||
|
||||
return _VSTD::__unchecked_get<_Sent>(__x.__hold_) - _VSTD::__unchecked_get<_I2>(__y.__hold_);
|
||||
return std::__unchecked_get<_Sent>(__x.__hold_) - std::__unchecked_get<_I2>(__y.__hold_);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const common_iterator& __i)
|
||||
@ -242,7 +242,7 @@ public:
|
||||
{
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__i.__hold_),
|
||||
"Attempted to iter_move a non-dereferenceable common_iterator");
|
||||
return ranges::iter_move( _VSTD::__unchecked_get<_Iter>(__i.__hold_));
|
||||
return ranges::iter_move( std::__unchecked_get<_Iter>(__i.__hold_));
|
||||
}
|
||||
|
||||
template<indirectly_swappable<_Iter> _I2, class _S2>
|
||||
@ -253,7 +253,7 @@ public:
|
||||
"Attempted to iter_swap a non-dereferenceable common_iterator");
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_I2>(__y.__hold_),
|
||||
"Attempted to iter_swap a non-dereferenceable common_iterator");
|
||||
return ranges::iter_swap(_VSTD::__unchecked_get<_Iter>(__x.__hold_), _VSTD::__unchecked_get<_I2>(__y.__hold_));
|
||||
return ranges::iter_swap(std::__unchecked_get<_Iter>(__x.__hold_), std::__unchecked_get<_I2>(__y.__hold_));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -72,10 +72,10 @@ using iter_common_reference_t = common_reference_t<iter_reference_t<_Tp>, iter_v
|
||||
template<class _Out, class _Tp>
|
||||
concept indirectly_writable =
|
||||
requires(_Out&& __o, _Tp&& __t) {
|
||||
*__o = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving
|
||||
*_VSTD::forward<_Out>(__o) = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving
|
||||
const_cast<const iter_reference_t<_Out>&&>(*__o) = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving
|
||||
const_cast<const iter_reference_t<_Out>&&>(*_VSTD::forward<_Out>(__o)) = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving
|
||||
*__o = std::forward<_Tp>(__t); // not required to be equality-preserving
|
||||
*std::forward<_Out>(__o) = std::forward<_Tp>(__t); // not required to be equality-preserving
|
||||
const_cast<const iter_reference_t<_Out>&&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving
|
||||
const_cast<const iter_reference_t<_Out>&&>(*std::forward<_Out>(__o)) = std::forward<_Tp>(__t); // not required to be equality-preserving
|
||||
};
|
||||
|
||||
// [iterator.concept.winc]
|
||||
@ -147,7 +147,7 @@ concept output_iterator =
|
||||
input_or_output_iterator<_Ip> &&
|
||||
indirectly_writable<_Ip, _Tp> &&
|
||||
requires (_Ip __it, _Tp&& __t) {
|
||||
*__it++ = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving
|
||||
*__it++ = std::forward<_Tp>(__t); // not required to be equality-preserving
|
||||
};
|
||||
|
||||
// [iterator.concept.forward]
|
||||
@ -190,7 +190,7 @@ concept contiguous_iterator =
|
||||
is_lvalue_reference_v<iter_reference_t<_Ip>> &&
|
||||
same_as<iter_value_t<_Ip>, remove_cvref_t<iter_reference_t<_Ip>>> &&
|
||||
requires(const _Ip& __i) {
|
||||
{ _VSTD::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Ip>>>;
|
||||
{ std::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Ip>>>;
|
||||
};
|
||||
|
||||
template<class _Ip>
|
||||
|
||||
@ -82,7 +82,7 @@ public:
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr counted_iterator(_Iter __iter, iter_difference_t<_Iter> __n)
|
||||
: __current_(_VSTD::move(__iter)), __count_(__n) {
|
||||
: __current_(std::move(__iter)), __count_(__n) {
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0, "__n must not be negative.");
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ public:
|
||||
constexpr const _Iter& base() const& noexcept { return __current_; }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr _Iter base() && { return _VSTD::move(__current_); }
|
||||
constexpr _Iter base() && { return std::move(__current_); }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr iter_difference_t<_Iter> count() const noexcept { return __count_; }
|
||||
@ -128,7 +128,7 @@ public:
|
||||
constexpr auto operator->() const noexcept
|
||||
requires contiguous_iterator<_Iter>
|
||||
{
|
||||
return _VSTD::to_address(__current_);
|
||||
return std::to_address(__current_);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
|
||||
@ -50,7 +50,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
typename iterator_traits<_InputIter>::difference_type
|
||||
distance(_InputIter __first, _InputIter __last)
|
||||
{
|
||||
return _VSTD::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
|
||||
return std::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
|
||||
}
|
||||
|
||||
#if _LIBCPP_STD_VER >= 20
|
||||
|
||||
@ -48,12 +48,12 @@ public:
|
||||
typedef void reference;
|
||||
typedef _Container container_type;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit front_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit front_insert_iterator(_Container& __x) : container(std::addressof(__x)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator=(const typename _Container::value_type& __value)
|
||||
{container->push_front(__value); return *this;}
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator=(typename _Container::value_type&& __value)
|
||||
{container->push_front(_VSTD::move(__value)); return *this;}
|
||||
{container->push_front(std::move(__value)); return *this;}
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator*() {return *this;}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator++() {return *this;}
|
||||
|
||||
@ -59,12 +59,12 @@ public:
|
||||
typedef _Container container_type;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
|
||||
: container(_VSTD::addressof(__x)), iter(__i) {}
|
||||
: container(std::addressof(__x)), iter(__i) {}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator=(const typename _Container::value_type& __value)
|
||||
{iter = container->insert(iter, __value); ++iter; return *this;}
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator=(typename _Container::value_type&& __value)
|
||||
{iter = container->insert(iter, _VSTD::move(__value)); ++iter; return *this;}
|
||||
{iter = container->insert(iter, std::move(__value)); ++iter; return *this;}
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator*() {return *this;}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++() {return *this;}
|
||||
|
||||
@ -51,14 +51,14 @@ public:
|
||||
#if _LIBCPP_STD_VER >= 20
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr istream_iterator(default_sentinel_t) : istream_iterator() {}
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
_LIBCPP_HIDE_FROM_ABI istream_iterator(istream_type& __s) : __in_stream_(_VSTD::addressof(__s))
|
||||
_LIBCPP_HIDE_FROM_ABI istream_iterator(istream_type& __s) : __in_stream_(std::addressof(__s))
|
||||
{
|
||||
if (!(*__in_stream_ >> __value_))
|
||||
__in_stream_ = nullptr;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI const _Tp& operator*() const {return __value_;}
|
||||
_LIBCPP_HIDE_FROM_ABI const _Tp* operator->() const {return _VSTD::addressof((operator*()));}
|
||||
_LIBCPP_HIDE_FROM_ABI const _Tp* operator->() const {return std::addressof((operator*()));}
|
||||
_LIBCPP_HIDE_FROM_ABI istream_iterator& operator++()
|
||||
{
|
||||
if (!(*__in_stream_ >> __value_))
|
||||
|
||||
@ -45,7 +45,7 @@ namespace __iter_swap {
|
||||
(__class_or_enum<remove_cvref_t<_T1>> || __class_or_enum<remove_cvref_t<_T2>>) &&
|
||||
requires (_T1&& __x, _T2&& __y) {
|
||||
// NOLINTNEXTLINE(libcpp-robust-against-adl) iter_swap ADL calls should only be made through ranges::iter_swap
|
||||
iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y));
|
||||
iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y));
|
||||
};
|
||||
|
||||
template<class _T1, class _T2>
|
||||
@ -60,9 +60,9 @@ namespace __iter_swap {
|
||||
requires __unqualified_iter_swap<_T1, _T2>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr void operator()(_T1&& __x, _T2&& __y) const
|
||||
noexcept(noexcept(iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y))))
|
||||
noexcept(noexcept(iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y))))
|
||||
{
|
||||
(void)iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y));
|
||||
(void)iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y));
|
||||
}
|
||||
// NOLINTEND(libcpp-robust-against-adl)
|
||||
|
||||
@ -71,9 +71,9 @@ namespace __iter_swap {
|
||||
__readable_swappable<_T1, _T2>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr void operator()(_T1&& __x, _T2&& __y) const
|
||||
noexcept(noexcept(ranges::swap(*_VSTD::forward<_T1>(__x), *_VSTD::forward<_T2>(__y))))
|
||||
noexcept(noexcept(ranges::swap(*std::forward<_T1>(__x), *std::forward<_T2>(__y))))
|
||||
{
|
||||
ranges::swap(*_VSTD::forward<_T1>(__x), *_VSTD::forward<_T2>(__y));
|
||||
ranges::swap(*std::forward<_T1>(__x), *std::forward<_T2>(__y));
|
||||
}
|
||||
|
||||
template <class _T1, class _T2>
|
||||
@ -85,11 +85,11 @@ namespace __iter_swap {
|
||||
constexpr void operator()(_T1&& __x, _T2&& __y) const
|
||||
noexcept(noexcept(iter_value_t<_T2>(ranges::iter_move(__y))) && //
|
||||
noexcept(*__y = ranges::iter_move(__x)) && //
|
||||
noexcept(*_VSTD::forward<_T1>(__x) = std::declval<iter_value_t<_T2>>()))
|
||||
noexcept(*std::forward<_T1>(__x) = std::declval<iter_value_t<_T2>>()))
|
||||
{
|
||||
iter_value_t<_T2> __old(ranges::iter_move(__y));
|
||||
*__y = ranges::iter_move(__x);
|
||||
*_VSTD::forward<_T1>(__x) = _VSTD::move(__old);
|
||||
*std::forward<_T1>(__x) = std::move(__old);
|
||||
}
|
||||
};
|
||||
} // namespace __iter_swap
|
||||
|
||||
@ -31,7 +31,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
|
||||
"Attempt to next(it, n) with negative n on a non-bidirectional iterator");
|
||||
|
||||
_VSTD::advance(__x, __n);
|
||||
std::advance(__x, __n);
|
||||
return __x;
|
||||
}
|
||||
|
||||
|
||||
@ -51,9 +51,9 @@ private:
|
||||
const char_type* __delim_;
|
||||
public:
|
||||
_LIBCPP_HIDE_FROM_ABI ostream_iterator(ostream_type& __s) _NOEXCEPT
|
||||
: __out_stream_(_VSTD::addressof(__s)), __delim_(nullptr) {}
|
||||
: __out_stream_(std::addressof(__s)), __delim_(nullptr) {}
|
||||
_LIBCPP_HIDE_FROM_ABI ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT
|
||||
: __out_stream_(_VSTD::addressof(__s)), __delim_(__delimiter) {}
|
||||
: __out_stream_(std::addressof(__s)), __delim_(__delimiter) {}
|
||||
_LIBCPP_HIDE_FROM_ABI ostream_iterator& operator=(const _Tp& __value)
|
||||
{
|
||||
*__out_stream_ << __value;
|
||||
|
||||
@ -30,7 +30,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) {
|
||||
_LIBCPP_ASSERT_UNCATEGORIZED(__n <= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
|
||||
"Attempt to prev(it, n) with a positive n on a non-bidirectional iterator");
|
||||
_VSTD::advance(__x, -__n);
|
||||
std::advance(__x, -__n);
|
||||
return __x;
|
||||
}
|
||||
|
||||
|
||||
@ -81,16 +81,16 @@ auto rend(const _Cp& __c) -> decltype(__c.rend())
|
||||
|
||||
template <class _Cp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
auto crbegin(const _Cp& __c) -> decltype(_VSTD::rbegin(__c))
|
||||
auto crbegin(const _Cp& __c) -> decltype(std::rbegin(__c))
|
||||
{
|
||||
return _VSTD::rbegin(__c);
|
||||
return std::rbegin(__c);
|
||||
}
|
||||
|
||||
template <class _Cp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
|
||||
auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c))
|
||||
auto crend(const _Cp& __c) -> decltype(std::rend(__c))
|
||||
{
|
||||
return _VSTD::rend(__c);
|
||||
return std::rend(__c);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 14
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT
|
||||
{
|
||||
return _VSTD::__to_address(__i_);
|
||||
return std::__to_address(__i_);
|
||||
}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator++() _NOEXCEPT
|
||||
{
|
||||
@ -222,7 +222,7 @@ struct _LIBCPP_TEMPLATE_VIS pointer_traits<__wrap_iter<_It> >
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
|
||||
static element_type *to_address(pointer __w) _NOEXCEPT {
|
||||
return _VSTD::__to_address(__w.base());
|
||||
return std::__to_address(__w.base());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -186,10 +186,10 @@ template <class _Facet>
|
||||
locale
|
||||
locale::combine(const locale& __other) const
|
||||
{
|
||||
if (!_VSTD::has_facet<_Facet>(__other))
|
||||
if (!std::has_facet<_Facet>(__other))
|
||||
__throw_runtime_error("locale::combine: locale missing facet");
|
||||
|
||||
return locale(*this, &const_cast<_Facet&>(_VSTD::use_facet<_Facet>(__other)));
|
||||
return locale(*this, &const_cast<_Facet&>(std::use_facet<_Facet>(__other)));
|
||||
}
|
||||
|
||||
template <class _Facet>
|
||||
@ -348,7 +348,7 @@ bool
|
||||
locale::operator()(const basic_string<_CharT, _Traits, _Allocator>& __x,
|
||||
const basic_string<_CharT, _Traits, _Allocator>& __y) const
|
||||
{
|
||||
return _VSTD::use_facet<_VSTD::collate<_CharT> >(*this).compare(
|
||||
return std::use_facet<std::collate<_CharT> >(*this).compare(
|
||||
__x.data(), __x.data() + __x.size(),
|
||||
__y.data(), __y.data() + __y.size()) < 0;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ struct __libcpp_locale_guard {
|
||||
// locale name, otherwise it will be a semicolon-separated string listing
|
||||
// each category. In the second case, we know at least one category won't
|
||||
// be what we want, so we only have to check the first case.
|
||||
if (_VSTD::strcmp(__l.__get_locale(), __lc) != 0) {
|
||||
if (std::strcmp(__l.__get_locale(), __lc) != 0) {
|
||||
__locale_all = _strdup(__lc);
|
||||
if (__locale_all == nullptr)
|
||||
__throw_bad_alloc();
|
||||
|
||||
@ -52,7 +52,7 @@ struct __allocation_guard {
|
||||
template<class _AllocT> // we perform the allocator conversion inside the constructor
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
explicit __allocation_guard(_AllocT __alloc, _Size __n)
|
||||
: __alloc_(_VSTD::move(__alloc))
|
||||
: __alloc_(std::move(__alloc))
|
||||
, __n_(__n)
|
||||
, __ptr_(allocator_traits<_Alloc>::allocate(__alloc_, __n_)) // initialization order is important
|
||||
{ }
|
||||
|
||||
@ -111,7 +111,7 @@ public:
|
||||
if (__libcpp_is_constant_evaluated()) {
|
||||
return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
|
||||
} else {
|
||||
return static_cast<_Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
|
||||
return static_cast<_Tp*>(std::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ public:
|
||||
if (__libcpp_is_constant_evaluated()) {
|
||||
::operator delete(__p);
|
||||
} else {
|
||||
_VSTD::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
|
||||
std::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,11 +145,11 @@ public:
|
||||
|
||||
_LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
|
||||
pointer address(reference __x) const _NOEXCEPT {
|
||||
return _VSTD::addressof(__x);
|
||||
return std::addressof(__x);
|
||||
}
|
||||
_LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
|
||||
const_pointer address(const_reference __x) const _NOEXCEPT {
|
||||
return _VSTD::addressof(__x);
|
||||
return std::addressof(__x);
|
||||
}
|
||||
|
||||
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX17
|
||||
@ -164,7 +164,7 @@ public:
|
||||
template <class _Up, class... _Args>
|
||||
_LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
|
||||
void construct(_Up* __p, _Args&&... __args) {
|
||||
::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
|
||||
::new ((void*)__p) _Up(std::forward<_Args>(__args)...);
|
||||
}
|
||||
|
||||
_LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
|
||||
@ -199,7 +199,7 @@ public:
|
||||
if (__libcpp_is_constant_evaluated()) {
|
||||
return static_cast<const _Tp*>(::operator new(__n * sizeof(_Tp)));
|
||||
} else {
|
||||
return static_cast<const _Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
|
||||
return static_cast<const _Tp*>(std::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ public:
|
||||
if (__libcpp_is_constant_evaluated()) {
|
||||
::operator delete(const_cast<_Tp*>(__p));
|
||||
} else {
|
||||
_VSTD::__libcpp_deallocate((void*) const_cast<_Tp *>(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
|
||||
std::__libcpp_deallocate((void*) const_cast<_Tp *>(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ public:
|
||||
|
||||
_LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
|
||||
const_pointer address(const_reference __x) const _NOEXCEPT {
|
||||
return _VSTD::addressof(__x);
|
||||
return std::addressof(__x);
|
||||
}
|
||||
|
||||
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX17
|
||||
@ -248,7 +248,7 @@ public:
|
||||
template <class _Up, class... _Args>
|
||||
_LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
|
||||
void construct(_Up* __p, _Args&&... __args) {
|
||||
::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
|
||||
::new ((void*)__p) _Up(std::forward<_Args>(__args)...);
|
||||
}
|
||||
|
||||
_LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
|
||||
|
||||
@ -54,7 +54,7 @@ template <class _Tp, class _Allocator, class... _Args>
|
||||
inline _LIBCPP_HIDE_FROM_ABI
|
||||
void __user_alloc_construct_impl (integral_constant<int, 0>, _Tp *__storage, const _Allocator &, _Args &&... __args )
|
||||
{
|
||||
new (__storage) _Tp (_VSTD::forward<_Args>(__args)...);
|
||||
new (__storage) _Tp (std::forward<_Args>(__args)...);
|
||||
}
|
||||
|
||||
// FIXME: This should have a version which takes a non-const alloc.
|
||||
@ -62,7 +62,7 @@ template <class _Tp, class _Allocator, class... _Args>
|
||||
inline _LIBCPP_HIDE_FROM_ABI
|
||||
void __user_alloc_construct_impl (integral_constant<int, 1>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
|
||||
{
|
||||
new (__storage) _Tp (allocator_arg, __a, _VSTD::forward<_Args>(__args)...);
|
||||
new (__storage) _Tp (allocator_arg, __a, std::forward<_Args>(__args)...);
|
||||
}
|
||||
|
||||
// FIXME: This should have a version which takes a non-const alloc.
|
||||
@ -70,7 +70,7 @@ template <class _Tp, class _Allocator, class... _Args>
|
||||
inline _LIBCPP_HIDE_FROM_ABI
|
||||
void __user_alloc_construct_impl (integral_constant<int, 2>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
|
||||
{
|
||||
new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a);
|
||||
new (__storage) _Tp (std::forward<_Args>(__args)..., __a);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
@ -293,7 +293,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
static void construct(allocator_type& __a, _Tp* __p, _Args&&... __args) {
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
__a.construct(__p, _VSTD::forward<_Args>(__args)...);
|
||||
__a.construct(__p, std::forward<_Args>(__args)...);
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
}
|
||||
template <class _Tp, class... _Args, class = void, class =
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user