[libc++][NFC] Replace _NOEXCEPT and _LIBCPP_CONSTEXPR macros with the keywords in C++11 code (#96387)
This commit is contained in:
parent
de0d4827ee
commit
1f98ac095e
@ -33,7 +33,7 @@ struct __atomic_base // false
|
||||
mutable __cxx_atomic_impl<_Tp> __a_;
|
||||
|
||||
#if _LIBCPP_STD_VER >= 17
|
||||
static _LIBCPP_CONSTEXPR bool is_always_lock_free = __libcpp_is_always_lock_free<__cxx_atomic_impl<_Tp> >::__value;
|
||||
static constexpr bool is_always_lock_free = __libcpp_is_always_lock_free<__cxx_atomic_impl<_Tp> >::__value;
|
||||
#endif
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI bool is_lock_free() const volatile _NOEXCEPT {
|
||||
@ -129,11 +129,6 @@ struct __atomic_base // false
|
||||
__atomic_base(const __atomic_base&) = delete;
|
||||
};
|
||||
|
||||
#if _LIBCPP_STD_VER >= 17
|
||||
template <class _Tp, bool __b>
|
||||
_LIBCPP_CONSTEXPR bool __atomic_base<_Tp, __b>::is_always_lock_free;
|
||||
#endif
|
||||
|
||||
// atomic<Integral>
|
||||
|
||||
template <class _Tp>
|
||||
|
@ -39,20 +39,17 @@ inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format operator^(chars_format __x,
|
||||
return chars_format(std::__to_underlying(__x) ^ std::__to_underlying(__y));
|
||||
}
|
||||
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 chars_format&
|
||||
operator&=(chars_format& __x, chars_format __y) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format& operator&=(chars_format& __x, chars_format __y) {
|
||||
__x = __x & __y;
|
||||
return __x;
|
||||
}
|
||||
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 chars_format&
|
||||
operator|=(chars_format& __x, chars_format __y) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format& operator|=(chars_format& __x, chars_format __y) {
|
||||
__x = __x | __y;
|
||||
return __x;
|
||||
}
|
||||
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 chars_format&
|
||||
operator^=(chars_format& __x, chars_format __y) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format& operator^=(chars_format& __x, chars_format __y) {
|
||||
__x = __x ^ __y;
|
||||
return __x;
|
||||
}
|
||||
|
@ -92,25 +92,22 @@ time_point_cast(const time_point<_Clock, _Duration>& __t) {
|
||||
|
||||
#if _LIBCPP_STD_VER >= 17
|
||||
template <class _ToDuration, class _Clock, class _Duration, enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR time_point<_Clock, _ToDuration>
|
||||
floor(const time_point<_Clock, _Duration>& __t) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr time_point<_Clock, _ToDuration> floor(const time_point<_Clock, _Duration>& __t) {
|
||||
return time_point<_Clock, _ToDuration>{chrono::floor<_ToDuration>(__t.time_since_epoch())};
|
||||
}
|
||||
|
||||
template <class _ToDuration, class _Clock, class _Duration, enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR time_point<_Clock, _ToDuration>
|
||||
ceil(const time_point<_Clock, _Duration>& __t) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr time_point<_Clock, _ToDuration> ceil(const time_point<_Clock, _Duration>& __t) {
|
||||
return time_point<_Clock, _ToDuration>{chrono::ceil<_ToDuration>(__t.time_since_epoch())};
|
||||
}
|
||||
|
||||
template <class _ToDuration, class _Clock, class _Duration, enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR time_point<_Clock, _ToDuration>
|
||||
round(const time_point<_Clock, _Duration>& __t) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr time_point<_Clock, _ToDuration> round(const time_point<_Clock, _Duration>& __t) {
|
||||
return time_point<_Clock, _ToDuration>{chrono::round<_ToDuration>(__t.time_since_epoch())};
|
||||
}
|
||||
|
||||
template <class _Rep, class _Period, enable_if_t<numeric_limits<_Rep>::is_signed, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR duration<_Rep, _Period> abs(duration<_Rep, _Period> __d) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr duration<_Rep, _Period> abs(duration<_Rep, _Period> __d) {
|
||||
return __d >= __d.zero() ? +__d : -__d;
|
||||
}
|
||||
#endif // _LIBCPP_STD_VER >= 17
|
||||
|
@ -516,7 +516,7 @@ struct __policy {
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI static const __policy* __create_empty() {
|
||||
static const _LIBCPP_CONSTEXPR __policy __policy = {
|
||||
static constexpr __policy __policy = {
|
||||
nullptr,
|
||||
nullptr,
|
||||
true,
|
||||
@ -543,7 +543,7 @@ private:
|
||||
|
||||
template <typename _Fun>
|
||||
_LIBCPP_HIDE_FROM_ABI static const __policy* __choose_policy(/* is_small = */ false_type) {
|
||||
static const _LIBCPP_CONSTEXPR __policy __policy = {
|
||||
static constexpr __policy __policy = {
|
||||
&__large_clone<_Fun>,
|
||||
&__large_destroy<_Fun>,
|
||||
false,
|
||||
@ -558,7 +558,7 @@ private:
|
||||
|
||||
template <typename _Fun>
|
||||
_LIBCPP_HIDE_FROM_ABI static const __policy* __choose_policy(/* is_small = */ true_type) {
|
||||
static const _LIBCPP_CONSTEXPR __policy __policy = {
|
||||
static constexpr __policy __policy = {
|
||||
nullptr,
|
||||
nullptr,
|
||||
false,
|
||||
|
@ -23,12 +23,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#if _LIBCPP_STD_VER >= 17
|
||||
|
||||
template <class _Cont>
|
||||
constexpr _LIBCPP_HIDE_FROM_ABI auto data(_Cont& __c) _NOEXCEPT_(noexcept(__c.data())) -> decltype(__c.data()) {
|
||||
constexpr _LIBCPP_HIDE_FROM_ABI auto data(_Cont& __c) noexcept(noexcept(__c.data())) -> decltype(__c.data()) {
|
||||
return __c.data();
|
||||
}
|
||||
|
||||
template <class _Cont>
|
||||
constexpr _LIBCPP_HIDE_FROM_ABI auto data(const _Cont& __c) _NOEXCEPT_(noexcept(__c.data())) -> decltype(__c.data()) {
|
||||
constexpr _LIBCPP_HIDE_FROM_ABI auto data(const _Cont& __c) noexcept(noexcept(__c.data())) -> decltype(__c.data()) {
|
||||
return __c.data();
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#if _LIBCPP_STD_VER >= 17
|
||||
|
||||
template <class _Cont>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto size(const _Cont& __c) _NOEXCEPT_(noexcept(__c.size())) -> decltype(__c.size()) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto size(const _Cont& __c) noexcept(noexcept(__c.size())) -> decltype(__c.size()) {
|
||||
return __c.size();
|
||||
}
|
||||
|
||||
@ -35,9 +35,9 @@ _LIBCPP_HIDE_FROM_ABI constexpr size_t size(const _Tp (&)[_Sz]) noexcept {
|
||||
|
||||
# if _LIBCPP_STD_VER >= 20
|
||||
template <class _Cont>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto ssize(const _Cont& __c)
|
||||
_NOEXCEPT_(noexcept(static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size())))
|
||||
-> common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>> {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto
|
||||
ssize(const _Cont& __c) noexcept(noexcept(static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(
|
||||
__c.size()))) -> common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>> {
|
||||
return static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size());
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ struct __ct_abs;
|
||||
|
||||
template <typename _Result, typename _Source>
|
||||
struct __ct_abs<_Result, _Source, true> {
|
||||
_LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI _Result operator()(_Source __t) const noexcept {
|
||||
constexpr _LIBCPP_HIDE_FROM_ABI _Result operator()(_Source __t) const noexcept {
|
||||
if (__t >= 0)
|
||||
return __t;
|
||||
if (__t == numeric_limits<_Source>::min())
|
||||
@ -48,11 +48,11 @@ struct __ct_abs<_Result, _Source, true> {
|
||||
|
||||
template <typename _Result, typename _Source>
|
||||
struct __ct_abs<_Result, _Source, false> {
|
||||
_LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI _Result operator()(_Source __t) const noexcept { return __t; }
|
||||
constexpr _LIBCPP_HIDE_FROM_ABI _Result operator()(_Source __t) const noexcept { return __t; }
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR _LIBCPP_HIDDEN _Tp __gcd(_Tp __a, _Tp __b) {
|
||||
constexpr _LIBCPP_HIDDEN _Tp __gcd(_Tp __a, _Tp __b) {
|
||||
static_assert(!is_signed<_Tp>::value, "");
|
||||
|
||||
// From: https://lemire.me/blog/2013/12/26/fastest-way-to-compute-the-greatest-common-divisor
|
||||
@ -96,7 +96,7 @@ _LIBCPP_CONSTEXPR _LIBCPP_HIDDEN _Tp __gcd(_Tp __a, _Tp __b) {
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI common_type_t<_Tp, _Up> gcd(_Tp __m, _Up __n) {
|
||||
constexpr _LIBCPP_HIDE_FROM_ABI common_type_t<_Tp, _Up> gcd(_Tp __m, _Up __n) {
|
||||
static_assert(is_integral<_Tp>::value && is_integral<_Up>::value, "Arguments to gcd must be integer types");
|
||||
static_assert(!is_same<__remove_cv_t<_Tp>, bool>::value, "First argument to gcd cannot be bool");
|
||||
static_assert(!is_same<__remove_cv_t<_Up>, bool>::value, "Second argument to gcd cannot be bool");
|
||||
@ -107,7 +107,7 @@ _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI common_type_t<_Tp, _Up> gcd(_Tp __m, _Up
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI common_type_t<_Tp, _Up> lcm(_Tp __m, _Up __n) {
|
||||
constexpr _LIBCPP_HIDE_FROM_ABI common_type_t<_Tp, _Up> lcm(_Tp __m, _Up __n) {
|
||||
static_assert(is_integral<_Tp>::value && is_integral<_Up>::value, "Arguments to lcm must be integer types");
|
||||
static_assert(!is_same<__remove_cv_t<_Tp>, bool>::value, "First argument to lcm cannot be bool");
|
||||
static_assert(!is_same<__remove_cv_t<_Up>, bool>::value, "Second argument to lcm cannot be bool");
|
||||
|
@ -50,8 +50,8 @@ public:
|
||||
static const result_type _Min = _Engine::_Min;
|
||||
static const result_type _Max = _Engine::_Max;
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const result_type _Min = _Engine::min();
|
||||
static _LIBCPP_CONSTEXPR const result_type _Max = _Engine::max();
|
||||
static constexpr result_type _Min = _Engine::min();
|
||||
static constexpr result_type _Max = _Engine::max();
|
||||
#endif
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR result_type min() { return _Engine::min(); }
|
||||
|
@ -270,26 +270,26 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t> {
|
||||
static inline _LIBCPP_HIDE_FROM_ABI constexpr bool lt(char_type __c1, char_type __c2) noexcept { return __c1 < __c2; }
|
||||
|
||||
static _LIBCPP_HIDE_FROM_ABI constexpr int
|
||||
compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
|
||||
compare(const char_type* __s1, const char_type* __s2, size_t __n) noexcept {
|
||||
return std::__constexpr_memcmp(__s1, __s2, __element_count(__n));
|
||||
}
|
||||
|
||||
static _LIBCPP_HIDE_FROM_ABI constexpr size_t length(const char_type* __str) _NOEXCEPT {
|
||||
static _LIBCPP_HIDE_FROM_ABI constexpr size_t length(const char_type* __str) noexcept {
|
||||
return std::__constexpr_strlen(__str);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr const char_type*
|
||||
find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
|
||||
find(const char_type* __s, size_t __n, const char_type& __a) noexcept {
|
||||
return std::__constexpr_memchr(__s, __a, __n);
|
||||
}
|
||||
|
||||
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 char_type*
|
||||
move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
|
||||
move(char_type* __s1, const char_type* __s2, size_t __n) noexcept {
|
||||
return std::__constexpr_memmove(__s1, __s2, __element_count(__n));
|
||||
}
|
||||
|
||||
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 char_type*
|
||||
copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
|
||||
copy(char_type* __s1, const char_type* __s2, size_t __n) noexcept {
|
||||
_LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(!std::__is_pointer_in_range(__s1, __s1 + __n, __s2),
|
||||
"char_traits::copy: source and destination ranges overlap");
|
||||
std::__constexpr_memmove(__s1, __s2, __element_count(__n));
|
||||
@ -297,7 +297,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t> {
|
||||
}
|
||||
|
||||
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 char_type*
|
||||
assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
|
||||
assign(char_type* __s, size_t __n, char_type __a) noexcept {
|
||||
std::fill_n(__s, __n, __a);
|
||||
return __s;
|
||||
}
|
||||
|
@ -135,16 +135,16 @@ struct _LIBCPP_TEMPLATE_VIS pair
|
||||
typename conditional< _MaybeEnable, _CheckArgs, __check_tuple_constructor_fail>::type;
|
||||
|
||||
template <bool _Dummy = true, __enable_if_t<_CheckArgsDep<_Dummy>::__enable_default(), int> = 0>
|
||||
explicit(!_CheckArgsDep<_Dummy>::__enable_implicit_default()) _LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR pair() _NOEXCEPT_(
|
||||
is_nothrow_default_constructible<first_type>::value&& is_nothrow_default_constructible<second_type>::value)
|
||||
explicit(!_CheckArgsDep<_Dummy>::__enable_implicit_default()) _LIBCPP_HIDE_FROM_ABI constexpr pair() noexcept(
|
||||
is_nothrow_default_constructible<first_type>::value && is_nothrow_default_constructible<second_type>::value)
|
||||
: first(), second() {}
|
||||
|
||||
template <bool _Dummy = true,
|
||||
__enable_if_t<_CheckArgsDep<_Dummy>::template __is_pair_constructible<_T1 const&, _T2 const&>(), int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(
|
||||
!_CheckArgsDep<_Dummy>::template __is_implicit<_T1 const&, _T2 const&>()) pair(_T1 const& __t1, _T2 const& __t2)
|
||||
_NOEXCEPT_(is_nothrow_copy_constructible<first_type>::value&& is_nothrow_copy_constructible<second_type>::value)
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgsDep<_Dummy>::template __is_implicit<_T1 const&, _T2 const&>())
|
||||
pair(_T1 const& __t1, _T2 const& __t2) noexcept(is_nothrow_copy_constructible<first_type>::value &&
|
||||
is_nothrow_copy_constructible<second_type>::value)
|
||||
: first(__t1), second(__t2) {}
|
||||
|
||||
template <
|
||||
@ -156,10 +156,9 @@ struct _LIBCPP_TEMPLATE_VIS pair
|
||||
class _U2,
|
||||
# endif
|
||||
__enable_if_t<_CheckArgs::template __is_pair_constructible<_U1, _U2>(), int> = 0 >
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgs::template __is_implicit<_U1, _U2>()) pair(_U1&& __u1, _U2&& __u2)
|
||||
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
|
||||
is_nothrow_constructible<second_type, _U2>::value))
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgs::template __is_implicit<_U1, _U2>())
|
||||
pair(_U1&& __u1, _U2&& __u2) noexcept(is_nothrow_constructible<first_type, _U1>::value &&
|
||||
is_nothrow_constructible<second_type, _U2>::value)
|
||||
: first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {
|
||||
}
|
||||
|
||||
@ -176,16 +175,14 @@ struct _LIBCPP_TEMPLATE_VIS pair
|
||||
__enable_if_t<_CheckArgs::template __is_pair_constructible<_U1 const&, _U2 const&>(), int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgs::template __is_implicit<_U1 const&, _U2 const&>())
|
||||
pair(pair<_U1, _U2> const& __p)
|
||||
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
|
||||
is_nothrow_constructible<second_type, _U2 const&>::value))
|
||||
pair(pair<_U1, _U2> const& __p) noexcept(is_nothrow_constructible<first_type, _U1 const&>::value &&
|
||||
is_nothrow_constructible<second_type, _U2 const&>::value)
|
||||
: first(__p.first), second(__p.second) {}
|
||||
|
||||
template <class _U1, class _U2, __enable_if_t<_CheckArgs::template __is_pair_constructible<_U1, _U2>(), int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgs::template __is_implicit<_U1, _U2>()) pair(pair<_U1, _U2>&& __p)
|
||||
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
|
||||
is_nothrow_constructible<second_type, _U2&&>::value))
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(!_CheckArgs::template __is_implicit<_U1, _U2>())
|
||||
pair(pair<_U1, _U2>&& __p) noexcept(is_nothrow_constructible<first_type, _U1&&>::value &&
|
||||
is_nothrow_constructible<second_type, _U2&&>::value)
|
||||
: first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) {}
|
||||
|
||||
# if _LIBCPP_STD_VER >= 23
|
||||
@ -219,8 +216,8 @@ struct _LIBCPP_TEMPLATE_VIS pair
|
||||
|
||||
template <class... _Args1, class... _Args2>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
|
||||
pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args, tuple<_Args2...> __second_args) _NOEXCEPT_(
|
||||
is_nothrow_constructible<first_type, _Args1...>::value&& is_nothrow_constructible<second_type, _Args2...>::value)
|
||||
pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args, tuple<_Args2...> __second_args) noexcept(
|
||||
is_nothrow_constructible<first_type, _Args1...>::value && is_nothrow_constructible<second_type, _Args2...>::value)
|
||||
: pair(__pc,
|
||||
__first_args,
|
||||
__second_args,
|
||||
@ -228,19 +225,19 @@ struct _LIBCPP_TEMPLATE_VIS pair
|
||||
typename __make_tuple_indices<sizeof...(_Args2) >::type()) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair&
|
||||
operator=(__conditional_t< is_copy_assignable<first_type>::value && is_copy_assignable<second_type>::value,
|
||||
pair,
|
||||
__nat> const& __p)
|
||||
_NOEXCEPT_(is_nothrow_copy_assignable<first_type>::value&& is_nothrow_copy_assignable<second_type>::value) {
|
||||
operator=(__conditional_t<is_copy_assignable<first_type>::value && is_copy_assignable<second_type>::value,
|
||||
pair,
|
||||
__nat> const& __p) noexcept(is_nothrow_copy_assignable<first_type>::value &&
|
||||
is_nothrow_copy_assignable<second_type>::value) {
|
||||
first = __p.first;
|
||||
second = __p.second;
|
||||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair& operator=(
|
||||
__conditional_t< is_move_assignable<first_type>::value && is_move_assignable<second_type>::value, pair, __nat>&&
|
||||
__p)
|
||||
_NOEXCEPT_(is_nothrow_move_assignable<first_type>::value&& is_nothrow_move_assignable<second_type>::value) {
|
||||
__conditional_t<is_move_assignable<first_type>::value && is_move_assignable<second_type>::value, pair, __nat>&&
|
||||
__p) noexcept(is_nothrow_move_assignable<first_type>::value &&
|
||||
is_nothrow_move_assignable<second_type>::value) {
|
||||
first = std::forward<first_type>(__p.first);
|
||||
second = std::forward<second_type>(__p.second);
|
||||
return *this;
|
||||
|
@ -632,11 +632,11 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
|
||||
_LIBCPP_HIDE_FROM_ABI deque(deque&& __c) noexcept(is_nothrow_move_constructible<allocator_type>::value);
|
||||
_LIBCPP_HIDE_FROM_ABI deque(deque&& __c, const __type_identity_t<allocator_type>& __a);
|
||||
_LIBCPP_HIDE_FROM_ABI deque& operator=(deque&& __c)
|
||||
_NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value&&
|
||||
is_nothrow_move_assignable<allocator_type>::value);
|
||||
_LIBCPP_HIDE_FROM_ABI deque&
|
||||
operator=(deque&& __c) noexcept(__alloc_traits::propagate_on_container_move_assignment::value &&
|
||||
is_nothrow_move_assignable<allocator_type>::value);
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI void assign(initializer_list<value_type> __il) { assign(__il.begin(), __il.end()); }
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
@ -1309,7 +1309,7 @@ deque<_Tp, _Allocator>::deque(initializer_list<value_type> __il, const allocator
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline deque<_Tp, _Allocator>::deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
|
||||
inline deque<_Tp, _Allocator>::deque(deque&& __c) noexcept(is_nothrow_move_constructible<allocator_type>::value)
|
||||
: __map_(std::move(__c.__map_)), __start_(std::move(__c.__start_)), __size_(std::move(__c.__size_)) {
|
||||
__c.__start_ = 0;
|
||||
__c.__size() = 0;
|
||||
@ -1333,8 +1333,9 @@ inline deque<_Tp, _Allocator>::deque(deque&& __c, const __type_identity_t<alloca
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline deque<_Tp, _Allocator>& deque<_Tp, _Allocator>::operator=(deque&& __c) _NOEXCEPT_(
|
||||
__alloc_traits::propagate_on_container_move_assignment::value&& is_nothrow_move_assignable<allocator_type>::value) {
|
||||
inline deque<_Tp, _Allocator>& deque<_Tp, _Allocator>::operator=(deque&& __c) noexcept(
|
||||
__alloc_traits::propagate_on_container_move_assignment::value &&
|
||||
is_nothrow_move_assignable<allocator_type>::value) {
|
||||
__move_assign(__c, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
|
||||
return *this;
|
||||
}
|
||||
@ -1349,8 +1350,8 @@ void deque<_Tp, _Allocator>::__move_assign(deque& __c, false_type) {
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void deque<_Tp, _Allocator>::__move_assign(deque& __c, true_type)
|
||||
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value) {
|
||||
void deque<_Tp, _Allocator>::__move_assign(deque& __c,
|
||||
true_type) noexcept(is_nothrow_move_assignable<allocator_type>::value) {
|
||||
clear();
|
||||
shrink_to_fit();
|
||||
__move_assign(__c);
|
||||
|
@ -145,10 +145,10 @@ template <class _Tp>
|
||||
class propagate_const;
|
||||
|
||||
template <class _Up>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const _Up& get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr const _Up& get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
|
||||
|
||||
template <class _Up>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Up& get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr _Up& get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
|
||||
|
||||
template <class _Tp>
|
||||
class propagate_const {
|
||||
@ -164,22 +164,22 @@ public:
|
||||
|
||||
private:
|
||||
template <class _Up>
|
||||
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR element_type* __get_pointer(_Up* __u) {
|
||||
static _LIBCPP_HIDE_FROM_ABI constexpr element_type* __get_pointer(_Up* __u) {
|
||||
return __u;
|
||||
}
|
||||
|
||||
template <class _Up>
|
||||
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR element_type* __get_pointer(_Up& __u) {
|
||||
static _LIBCPP_HIDE_FROM_ABI constexpr element_type* __get_pointer(_Up& __u) {
|
||||
return __get_pointer(__u.get());
|
||||
}
|
||||
|
||||
template <class _Up>
|
||||
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const element_type* __get_pointer(const _Up* __u) {
|
||||
static _LIBCPP_HIDE_FROM_ABI constexpr const element_type* __get_pointer(const _Up* __u) {
|
||||
return __u;
|
||||
}
|
||||
|
||||
template <class _Up>
|
||||
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const element_type* __get_pointer(const _Up& __u) {
|
||||
static _LIBCPP_HIDE_FROM_ABI constexpr const element_type* __get_pointer(const _Up& __u) {
|
||||
return __get_pointer(__u.get());
|
||||
}
|
||||
|
||||
@ -193,214 +193,207 @@ private:
|
||||
|
||||
public:
|
||||
template <class _Up>
|
||||
friend _LIBCPP_CONSTEXPR const _Up&
|
||||
experimental::fundamentals_v2::get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
|
||||
friend constexpr const _Up& experimental::fundamentals_v2::get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
|
||||
template <class _Up>
|
||||
friend _LIBCPP_CONSTEXPR _Up& experimental::fundamentals_v2::get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
|
||||
friend constexpr _Up& experimental::fundamentals_v2::get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR propagate_const() = default;
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr propagate_const() = default;
|
||||
|
||||
propagate_const(const propagate_const&) = delete;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR propagate_const(propagate_const&&) = default;
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr propagate_const(propagate_const&&) = default;
|
||||
|
||||
template <class _Up,
|
||||
enable_if_t<!is_convertible<_Up, _Tp>::value && is_constructible<_Tp, _Up&&>::value, bool> = true>
|
||||
explicit _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR propagate_const(propagate_const<_Up>&& __pu)
|
||||
explicit _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(propagate_const<_Up>&& __pu)
|
||||
: __t_(std::move(experimental::get_underlying(__pu))) {}
|
||||
|
||||
template <class _Up,
|
||||
enable_if_t<is_convertible<_Up&&, _Tp>::value && is_constructible<_Tp, _Up&&>::value, bool> = false>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR propagate_const(propagate_const<_Up>&& __pu)
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr propagate_const(propagate_const<_Up>&& __pu)
|
||||
: __t_(std::move(experimental::get_underlying(__pu))) {}
|
||||
|
||||
template <class _Up,
|
||||
enable_if_t<!is_convertible<_Up&&, _Tp>::value && is_constructible<_Tp, _Up&&>::value &&
|
||||
!__is_propagate_const<decay_t<_Up>>::value,
|
||||
bool> = true>
|
||||
explicit _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR propagate_const(_Up&& __u) : __t_(std::forward<_Up>(__u)) {}
|
||||
explicit _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(_Up&& __u) : __t_(std::forward<_Up>(__u)) {}
|
||||
|
||||
template <class _Up,
|
||||
enable_if_t<is_convertible<_Up&&, _Tp>::value && is_constructible<_Tp, _Up&&>::value &&
|
||||
!__is_propagate_const<decay_t<_Up>>::value,
|
||||
bool> = false>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR propagate_const(_Up&& __u) : __t_(std::forward<_Up>(__u)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr propagate_const(_Up&& __u) : __t_(std::forward<_Up>(__u)) {}
|
||||
|
||||
propagate_const& operator=(const propagate_const&) = delete;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR propagate_const& operator=(propagate_const&&) = default;
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr propagate_const& operator=(propagate_const&&) = default;
|
||||
|
||||
template <class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR propagate_const& operator=(propagate_const<_Up>&& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr propagate_const& operator=(propagate_const<_Up>&& __pu) {
|
||||
__t_ = std::move(experimental::get_underlying(__pu));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class _Up, class _Vp = enable_if_t<!__is_propagate_const<decay_t<_Up>>::value>>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR propagate_const& operator=(_Up&& __u) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr propagate_const& operator=(_Up&& __u) {
|
||||
__t_ = std::forward<_Up>(__u);
|
||||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const element_type* get() const { return __get_pointer(__t_); }
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr const element_type* get() const { return __get_pointer(__t_); }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR element_type* get() { return __get_pointer(__t_); }
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr element_type* get() { return __get_pointer(__t_); }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI explicit _LIBCPP_CONSTEXPR operator bool() const { return get() != nullptr; }
|
||||
_LIBCPP_HIDE_FROM_ABI explicit constexpr operator bool() const { return get() != nullptr; }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const element_type* operator->() const { return get(); }
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr const element_type* operator->() const { return get(); }
|
||||
|
||||
template <class _Dummy = _Tp, class _Up = enable_if_t<is_convertible< const _Dummy, const element_type*>::value>>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR operator const element_type*() const {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr operator const element_type*() const {
|
||||
return get();
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const element_type& operator*() const { return *get(); }
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr const element_type& operator*() const { return *get(); }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR element_type* operator->() { return get(); }
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr element_type* operator->() { return get(); }
|
||||
|
||||
template <class _Dummy = _Tp, class _Up = enable_if_t< is_convertible<_Dummy, element_type*>::value>>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR operator element_type*() {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr operator element_type*() {
|
||||
return get();
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR element_type& operator*() { return *get(); }
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr element_type& operator*() { return *get(); }
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR void swap(propagate_const& __pt) _NOEXCEPT_(__is_nothrow_swappable_v<_Tp>) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr void swap(propagate_const& __pt) noexcept(__is_nothrow_swappable_v<_Tp>) {
|
||||
using std::swap;
|
||||
swap(__t_, __pt.__t_);
|
||||
}
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, nullptr_t) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const propagate_const<_Tp>& __pt, nullptr_t) {
|
||||
return experimental::get_underlying(__pt) == nullptr;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator==(nullptr_t, const propagate_const<_Tp>& __pt) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(nullptr_t, const propagate_const<_Tp>& __pt) {
|
||||
return nullptr == experimental::get_underlying(__pt);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, nullptr_t) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const propagate_const<_Tp>& __pt, nullptr_t) {
|
||||
return experimental::get_underlying(__pt) != nullptr;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator!=(nullptr_t, const propagate_const<_Tp>& __pt) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(nullptr_t, const propagate_const<_Tp>& __pt) {
|
||||
return nullptr != experimental::get_underlying(__pt);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
|
||||
operator==(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
return experimental::get_underlying(__pt) == experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
|
||||
operator!=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
return experimental::get_underlying(__pt) != experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
|
||||
operator<(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator<(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
return experimental::get_underlying(__pt) < experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
|
||||
operator>(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator>(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
return experimental::get_underlying(__pt) > experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
|
||||
operator<=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
return experimental::get_underlying(__pt) <= experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool
|
||||
operator>=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
|
||||
return experimental::get_underlying(__pt) >= experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
return experimental::get_underlying(__pt) == __u;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
return experimental::get_underlying(__pt) != __u;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator<(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
return experimental::get_underlying(__pt) < __u;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator>(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
return experimental::get_underlying(__pt) > __u;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
return experimental::get_underlying(__pt) <= __u;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(const propagate_const<_Tp>& __pt, const _Up& __u) {
|
||||
return experimental::get_underlying(__pt) >= __u;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator==(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
return __t == experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator!=(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
return __t != experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator<(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator<(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
return __t < experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator>(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator>(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
return __t > experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator<=(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
return __t <= experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator>=(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(const _Tp& __t, const propagate_const<_Up>& __pu) {
|
||||
return __t >= experimental::get_underlying(__pu);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR void swap(propagate_const<_Tp>& __pc1, propagate_const<_Tp>& __pc2)
|
||||
_NOEXCEPT_(__is_nothrow_swappable_v<_Tp>) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr void
|
||||
swap(propagate_const<_Tp>& __pc1, propagate_const<_Tp>& __pc2) noexcept(__is_nothrow_swappable_v<_Tp>) {
|
||||
__pc1.swap(__pc2);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const _Tp& get_underlying(const propagate_const<_Tp>& __pt) _NOEXCEPT {
|
||||
constexpr const _Tp& get_underlying(const propagate_const<_Tp>& __pt) _NOEXCEPT {
|
||||
return __pt.__t_;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR _Tp& get_underlying(propagate_const<_Tp>& __pt) _NOEXCEPT {
|
||||
constexpr _Tp& get_underlying(propagate_const<_Tp>& __pt) _NOEXCEPT {
|
||||
return __pt.__t_;
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ using is_detected = typename _DETECTOR<nonesuch, void, _Op, _Args...>::value_t;
|
||||
template <template <class...> class _Op, class... _Args>
|
||||
using detected_t = typename _DETECTOR<nonesuch, void, _Op, _Args...>::type;
|
||||
template <template <class...> class _Op, class... _Args>
|
||||
_LIBCPP_CONSTEXPR bool is_detected_v = is_detected<_Op, _Args...>::value;
|
||||
constexpr bool is_detected_v = is_detected<_Op, _Args...>::value;
|
||||
|
||||
template <class _Default, template <class...> class _Op, class... _Args>
|
||||
using detected_or = _DETECTOR<_Default, void, _Op, _Args...>;
|
||||
@ -139,12 +139,12 @@ using detected_or_t = typename detected_or<_Default, _Op, _Args...>::type;
|
||||
template <class _Expected, template <class...> class _Op, class... _Args>
|
||||
using is_detected_exact = is_same<_Expected, detected_t<_Op, _Args...>>;
|
||||
template <class _Expected, template <class...> class _Op, class... _Args>
|
||||
_LIBCPP_CONSTEXPR bool is_detected_exact_v = is_detected_exact<_Expected, _Op, _Args...>::value;
|
||||
constexpr bool is_detected_exact_v = is_detected_exact<_Expected, _Op, _Args...>::value;
|
||||
|
||||
template <class _To, template <class...> class _Op, class... _Args>
|
||||
using is_detected_convertible = is_convertible<detected_t<_Op, _Args...>, _To>;
|
||||
template <class _To, template <class...> class _Op, class... _Args>
|
||||
_LIBCPP_CONSTEXPR bool is_detected_convertible_v = is_detected_convertible<_To, _Op, _Args...>::value;
|
||||
constexpr bool is_detected_convertible_v = is_detected_convertible<_To, _Op, _Args...>::value;
|
||||
|
||||
_LIBCPP_END_NAMESPACE_LFTS
|
||||
|
||||
|
@ -513,8 +513,8 @@ protected:
|
||||
|
||||
public:
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI __forward_list_base(__forward_list_base&& __x)
|
||||
_NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value);
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
__forward_list_base(__forward_list_base&& __x) noexcept(is_nothrow_move_constructible<__node_allocator>::value);
|
||||
_LIBCPP_HIDE_FROM_ABI __forward_list_base(__forward_list_base&& __x, const allocator_type& __a);
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
@ -589,8 +589,8 @@ private:
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
inline __forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x)
|
||||
_NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value)
|
||||
inline __forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x) noexcept(
|
||||
is_nothrow_move_constructible<__node_allocator>::value)
|
||||
: __before_begin_(std::move(__x.__before_begin_)) {
|
||||
__x.__before_begin()->__next_ = nullptr;
|
||||
}
|
||||
@ -707,15 +707,16 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI forward_list& operator=(const forward_list& __x);
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI forward_list(forward_list&& __x) _NOEXCEPT_(is_nothrow_move_constructible<base>::value)
|
||||
_LIBCPP_HIDE_FROM_ABI forward_list(forward_list&& __x) noexcept(is_nothrow_move_constructible<base>::value)
|
||||
: base(std::move(__x)) {}
|
||||
_LIBCPP_HIDE_FROM_ABI forward_list(forward_list&& __x, const __type_identity_t<allocator_type>& __a);
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI forward_list(initializer_list<value_type> __il);
|
||||
_LIBCPP_HIDE_FROM_ABI forward_list(initializer_list<value_type> __il, const allocator_type& __a);
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI forward_list& operator=(forward_list&& __x) _NOEXCEPT_(
|
||||
__node_traits::propagate_on_container_move_assignment::value&& is_nothrow_move_assignable<allocator_type>::value);
|
||||
_LIBCPP_HIDE_FROM_ABI forward_list& operator=(forward_list&& __x) noexcept(
|
||||
__node_traits::propagate_on_container_move_assignment::value &&
|
||||
is_nothrow_move_assignable<allocator_type>::value);
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI forward_list& operator=(initializer_list<value_type> __il);
|
||||
|
||||
|
@ -426,19 +426,19 @@ _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(launch)
|
||||
|
||||
typedef underlying_type<launch>::type __launch_underlying_type;
|
||||
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR launch operator&(launch __x, launch __y) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr launch operator&(launch __x, launch __y) {
|
||||
return static_cast<launch>(static_cast<__launch_underlying_type>(__x) & static_cast<__launch_underlying_type>(__y));
|
||||
}
|
||||
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR launch operator|(launch __x, launch __y) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr launch operator|(launch __x, launch __y) {
|
||||
return static_cast<launch>(static_cast<__launch_underlying_type>(__x) | static_cast<__launch_underlying_type>(__y));
|
||||
}
|
||||
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR launch operator^(launch __x, launch __y) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr launch operator^(launch __x, launch __y) {
|
||||
return static_cast<launch>(static_cast<__launch_underlying_type>(__x) ^ static_cast<__launch_underlying_type>(__y));
|
||||
}
|
||||
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR launch operator~(launch __x) {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr launch operator~(launch __x) {
|
||||
return static_cast<launch>(~static_cast<__launch_underlying_type>(__x) & 3);
|
||||
}
|
||||
|
||||
|
@ -1052,7 +1052,7 @@ list<_Tp, _Alloc>::list(initializer_list<value_type> __il) {
|
||||
}
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
inline list<_Tp, _Alloc>::list(list&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value)
|
||||
inline list<_Tp, _Alloc>::list(list&& __c) noexcept(is_nothrow_move_constructible<__node_allocator>::value)
|
||||
: base(std::move(__c.__node_alloc())) {
|
||||
splice(end(), __c);
|
||||
}
|
||||
@ -1068,9 +1068,9 @@ inline list<_Tp, _Alloc>::list(list&& __c, const __type_identity_t<allocator_typ
|
||||
}
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
inline list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(list&& __c)
|
||||
_NOEXCEPT_(__node_alloc_traits::propagate_on_container_move_assignment::value&&
|
||||
is_nothrow_move_assignable<__node_allocator>::value) {
|
||||
inline list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(list&& __c) noexcept(
|
||||
__node_alloc_traits::propagate_on_container_move_assignment::value &&
|
||||
is_nothrow_move_assignable<__node_allocator>::value) {
|
||||
__move_assign(__c, integral_constant<bool, __node_alloc_traits::propagate_on_container_move_assignment::value>());
|
||||
return *this;
|
||||
}
|
||||
@ -1085,8 +1085,8 @@ void list<_Tp, _Alloc>::__move_assign(list& __c, false_type) {
|
||||
}
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void list<_Tp, _Alloc>::__move_assign(list& __c, true_type)
|
||||
_NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value) {
|
||||
void list<_Tp, _Alloc>::__move_assign(list& __c,
|
||||
true_type) noexcept(is_nothrow_move_assignable<__node_allocator>::value) {
|
||||
clear();
|
||||
base::__move_assign_alloc(__c);
|
||||
splice(end(), __c);
|
||||
|
@ -1090,12 +1090,12 @@ public:
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI map(map&& __m) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
|
||||
_LIBCPP_HIDE_FROM_ABI map(map&& __m) noexcept(is_nothrow_move_constructible<__base>::value)
|
||||
: __tree_(std::move(__m.__tree_)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI map(map&& __m, const allocator_type& __a);
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI map& operator=(map&& __m) _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) {
|
||||
_LIBCPP_HIDE_FROM_ABI map& operator=(map&& __m) noexcept(is_nothrow_move_assignable<__base>::value) {
|
||||
__tree_ = std::move(__m.__tree_);
|
||||
return *this;
|
||||
}
|
||||
@ -1777,12 +1777,12 @@ public:
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI multimap(multimap&& __m) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
|
||||
_LIBCPP_HIDE_FROM_ABI multimap(multimap&& __m) noexcept(is_nothrow_move_constructible<__base>::value)
|
||||
: __tree_(std::move(__m.__tree_)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI multimap(multimap&& __m, const allocator_type& __a);
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI multimap& operator=(multimap&& __m) _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) {
|
||||
_LIBCPP_HIDE_FROM_ABI multimap& operator=(multimap&& __m) noexcept(is_nothrow_move_assignable<__base>::value) {
|
||||
__tree_ = std::move(__m.__tree_);
|
||||
return *this;
|
||||
}
|
||||
|
@ -341,10 +341,10 @@ public:
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI queue(queue&& __q) _NOEXCEPT_(is_nothrow_move_constructible<container_type>::value)
|
||||
_LIBCPP_HIDE_FROM_ABI queue(queue&& __q) noexcept(is_nothrow_move_constructible<container_type>::value)
|
||||
: c(std::move(__q.c)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI queue& operator=(queue&& __q) _NOEXCEPT_(is_nothrow_move_assignable<container_type>::value) {
|
||||
_LIBCPP_HIDE_FROM_ABI queue& operator=(queue&& __q) noexcept(is_nothrow_move_assignable<container_type>::value) {
|
||||
c = std::move(__q.c);
|
||||
return *this;
|
||||
}
|
||||
@ -539,12 +539,12 @@ public:
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI priority_queue(priority_queue&& __q) _NOEXCEPT_(
|
||||
is_nothrow_move_constructible<container_type>::value&& is_nothrow_move_constructible<value_compare>::value)
|
||||
_LIBCPP_HIDE_FROM_ABI priority_queue(priority_queue&& __q) noexcept(
|
||||
is_nothrow_move_constructible<container_type>::value && is_nothrow_move_constructible<value_compare>::value)
|
||||
: c(std::move(__q.c)), comp(std::move(__q.comp)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI priority_queue& operator=(priority_queue&& __q)
|
||||
_NOEXCEPT_(is_nothrow_move_assignable<container_type>::value&& is_nothrow_move_assignable<value_compare>::value) {
|
||||
_LIBCPP_HIDE_FROM_ABI priority_queue& operator=(priority_queue&& __q) noexcept(
|
||||
is_nothrow_move_assignable<container_type>::value && is_nothrow_move_assignable<value_compare>::value) {
|
||||
c = std::move(__q.c);
|
||||
comp = std::move(__q.comp);
|
||||
return *this;
|
||||
|
@ -659,7 +659,7 @@ public:
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI set(set&& __s) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
|
||||
_LIBCPP_HIDE_FROM_ABI set(set&& __s) noexcept(is_nothrow_move_constructible<__base>::value)
|
||||
: __tree_(std::move(__s.__tree_)) {}
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
@ -692,7 +692,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI set& operator=(set&& __s) _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) {
|
||||
_LIBCPP_HIDE_FROM_ABI set& operator=(set&& __s) noexcept(is_nothrow_move_assignable<__base>::value) {
|
||||
__tree_ = std::move(__s.__tree_);
|
||||
return *this;
|
||||
}
|
||||
@ -1119,7 +1119,7 @@ public:
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI multiset(multiset&& __s) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
|
||||
_LIBCPP_HIDE_FROM_ABI multiset(multiset&& __s) noexcept(is_nothrow_move_constructible<__base>::value)
|
||||
: __tree_(std::move(__s.__tree_)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI multiset(multiset&& __s, const allocator_type& __a);
|
||||
|
@ -173,10 +173,10 @@ public:
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI stack(stack&& __q) _NOEXCEPT_(is_nothrow_move_constructible<container_type>::value)
|
||||
_LIBCPP_HIDE_FROM_ABI stack(stack&& __q) noexcept(is_nothrow_move_constructible<container_type>::value)
|
||||
: c(std::move(__q.c)) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI stack& operator=(stack&& __q) _NOEXCEPT_(is_nothrow_move_assignable<container_type>::value) {
|
||||
_LIBCPP_HIDE_FROM_ABI stack& operator=(stack&& __q) noexcept(is_nothrow_move_assignable<container_type>::value) {
|
||||
c = std::move(__q.c);
|
||||
return *this;
|
||||
}
|
||||
|
@ -1161,8 +1161,8 @@ public:
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(basic_string&& __str)
|
||||
_NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value) {
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
|
||||
operator=(basic_string&& __str) noexcept(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value) {
|
||||
__move_assign(__str, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
|
||||
return *this;
|
||||
}
|
||||
@ -1418,8 +1418,8 @@ public:
|
||||
return *this = __str;
|
||||
}
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(basic_string&& __str)
|
||||
_NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value) {
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
|
||||
assign(basic_string&& __str) noexcept(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value) {
|
||||
*this = std::move(__str);
|
||||
return *this;
|
||||
}
|
||||
@ -2081,14 +2081,14 @@ private:
|
||||
__copy_assign_alloc(const basic_string&, false_type) _NOEXCEPT {}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign(basic_string& __str, false_type)
|
||||
_NOEXCEPT_(__alloc_traits::is_always_equal::value);
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
|
||||
__move_assign(basic_string& __str, false_type) noexcept(__alloc_traits::is_always_equal::value);
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS void
|
||||
__move_assign(basic_string& __str, true_type)
|
||||
# if _LIBCPP_STD_VER >= 17
|
||||
_NOEXCEPT;
|
||||
noexcept;
|
||||
# else
|
||||
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
|
||||
noexcept(is_nothrow_move_assignable<allocator_type>::value);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -2579,9 +2579,8 @@ basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str)
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void
|
||||
basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, false_type)
|
||||
_NOEXCEPT_(__alloc_traits::is_always_equal::value) {
|
||||
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::__move_assign(
|
||||
basic_string& __str, false_type) noexcept(__alloc_traits::is_always_equal::value) {
|
||||
if (__alloc() != __str.__alloc())
|
||||
assign(__str);
|
||||
else
|
||||
@ -2592,9 +2591,9 @@ template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS void
|
||||
basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, true_type)
|
||||
# if _LIBCPP_STD_VER >= 17
|
||||
_NOEXCEPT
|
||||
noexcept
|
||||
# else
|
||||
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
|
||||
noexcept(is_nothrow_move_assignable<allocator_type>::value)
|
||||
# endif
|
||||
{
|
||||
__annotate_delete();
|
||||
|
@ -902,32 +902,31 @@ struct hash<basic_string_view<wchar_t, char_traits<wchar_t> > > : __string_view_
|
||||
#if _LIBCPP_STD_VER >= 14
|
||||
inline namespace literals {
|
||||
inline namespace string_view_literals {
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR basic_string_view<char>
|
||||
operator""sv(const char* __str, size_t __len) _NOEXCEPT {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr basic_string_view<char> operator""sv(const char* __str, size_t __len) noexcept {
|
||||
return basic_string_view<char>(__str, __len);
|
||||
}
|
||||
|
||||
# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR basic_string_view<wchar_t>
|
||||
operator""sv(const wchar_t* __str, size_t __len) _NOEXCEPT {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr basic_string_view<wchar_t>
|
||||
operator""sv(const wchar_t* __str, size_t __len) noexcept {
|
||||
return basic_string_view<wchar_t>(__str, __len);
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR basic_string_view<char8_t>
|
||||
operator""sv(const char8_t* __str, size_t __len) _NOEXCEPT {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr basic_string_view<char8_t>
|
||||
operator""sv(const char8_t* __str, size_t __len) noexcept {
|
||||
return basic_string_view<char8_t>(__str, __len);
|
||||
}
|
||||
# endif
|
||||
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR basic_string_view<char16_t>
|
||||
operator""sv(const char16_t* __str, size_t __len) _NOEXCEPT {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr basic_string_view<char16_t>
|
||||
operator""sv(const char16_t* __str, size_t __len) noexcept {
|
||||
return basic_string_view<char16_t>(__str, __len);
|
||||
}
|
||||
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR basic_string_view<char32_t>
|
||||
operator""sv(const char32_t* __str, size_t __len) _NOEXCEPT {
|
||||
inline _LIBCPP_HIDE_FROM_ABI constexpr basic_string_view<char32_t>
|
||||
operator""sv(const char32_t* __str, size_t __len) noexcept {
|
||||
return basic_string_view<char32_t>(__str, __len);
|
||||
}
|
||||
} // namespace string_view_literals
|
||||
|
@ -279,14 +279,14 @@ class __tuple_leaf;
|
||||
|
||||
template <size_t _Ip, class _Hp, bool _Ep>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
|
||||
swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x, __tuple_leaf<_Ip, _Hp, _Ep>& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Hp>) {
|
||||
swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x, __tuple_leaf<_Ip, _Hp, _Ep>& __y) noexcept(__is_nothrow_swappable_v<_Hp>) {
|
||||
swap(__x.get(), __y.get());
|
||||
}
|
||||
|
||||
template <size_t _Ip, class _Hp, bool _Ep>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
|
||||
swap(const __tuple_leaf<_Ip, _Hp, _Ep>& __x, const __tuple_leaf<_Ip, _Hp, _Ep>& __y)
|
||||
_NOEXCEPT_(__is_nothrow_swappable_v<const _Hp>) {
|
||||
swap(const __tuple_leaf<_Ip, _Hp, _Ep>& __x,
|
||||
const __tuple_leaf<_Ip, _Hp, _Ep>& __y) noexcept(__is_nothrow_swappable_v<const _Hp>) {
|
||||
swap(__x.get(), __y.get());
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ class __tuple_leaf {
|
||||
public:
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 __tuple_leaf& operator=(const __tuple_leaf&) = delete;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf() _NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) : __value_() {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf() noexcept(is_nothrow_default_constructible<_Hp>::value) : __value_() {
|
||||
static_assert(!is_reference<_Hp>::value, "Attempted to default construct a reference element in a tuple");
|
||||
}
|
||||
|
||||
@ -330,7 +330,7 @@ public:
|
||||
class _Tp,
|
||||
__enable_if_t<_And<_IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp> >::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_(is_nothrow_constructible<_Hp, _Tp>::value)
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __tuple_leaf(_Tp&& __t) noexcept(is_nothrow_constructible<_Hp, _Tp>::value)
|
||||
: __value_(std::forward<_Tp>(__t)) {
|
||||
static_assert(__can_bind_reference<_Tp&&>(),
|
||||
"Attempted construction of reference element binds to a temporary whose lifetime has ended");
|
||||
@ -361,14 +361,14 @@ public:
|
||||
_LIBCPP_HIDE_FROM_ABI __tuple_leaf(const __tuple_leaf& __t) = default;
|
||||
_LIBCPP_HIDE_FROM_ABI __tuple_leaf(__tuple_leaf&& __t) = default;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int swap(__tuple_leaf& __t)
|
||||
_NOEXCEPT_(__is_nothrow_swappable_v<__tuple_leaf>) {
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int
|
||||
swap(__tuple_leaf& __t) noexcept(__is_nothrow_swappable_v<__tuple_leaf>) {
|
||||
std::swap(*this, __t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int swap(const __tuple_leaf& __t) const
|
||||
_NOEXCEPT_(__is_nothrow_swappable_v<const __tuple_leaf>) {
|
||||
noexcept(__is_nothrow_swappable_v<const __tuple_leaf>) {
|
||||
std::swap(*this, __t);
|
||||
return 0;
|
||||
}
|
||||
@ -382,7 +382,7 @@ class __tuple_leaf<_Ip, _Hp, true> : private _Hp {
|
||||
public:
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 __tuple_leaf& operator=(const __tuple_leaf&) = delete;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf() _NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) {}
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf() noexcept(is_nothrow_default_constructible<_Hp>::value) {}
|
||||
|
||||
template <class _Alloc>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf(integral_constant<int, 0>, const _Alloc&) {}
|
||||
@ -398,7 +398,7 @@ public:
|
||||
__enable_if_t< _And< _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp> >::value,
|
||||
int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_(is_nothrow_constructible<_Hp, _Tp>::value)
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __tuple_leaf(_Tp&& __t) noexcept(is_nothrow_constructible<_Hp, _Tp>::value)
|
||||
: _Hp(std::forward<_Tp>(__t)) {}
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
@ -416,14 +416,14 @@ public:
|
||||
__tuple_leaf(__tuple_leaf const&) = default;
|
||||
__tuple_leaf(__tuple_leaf&&) = default;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int swap(__tuple_leaf& __t)
|
||||
_NOEXCEPT_(__is_nothrow_swappable_v<__tuple_leaf>) {
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int
|
||||
swap(__tuple_leaf& __t) noexcept(__is_nothrow_swappable_v<__tuple_leaf>) {
|
||||
std::swap(*this, __t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int swap(const __tuple_leaf& __rhs) const
|
||||
_NOEXCEPT_(__is_nothrow_swappable_v<const __tuple_leaf>) {
|
||||
noexcept(__is_nothrow_swappable_v<const __tuple_leaf>) {
|
||||
std::swap(*this, __rhs);
|
||||
return 0;
|
||||
}
|
||||
@ -451,14 +451,17 @@ struct __tuple_impl;
|
||||
template <size_t... _Indx, class... _Tp>
|
||||
struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
|
||||
: public __tuple_leaf<_Indx, _Tp>... {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_impl()
|
||||
_NOEXCEPT_(__all<is_nothrow_default_constructible<_Tp>::value...>::value) {}
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_impl() noexcept(
|
||||
__all<is_nothrow_default_constructible<_Tp>::value...>::value) {}
|
||||
|
||||
template <size_t... _Uf, class... _Tf, size_t... _Ul, class... _Tl, class... _Up>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __tuple_impl(
|
||||
__tuple_indices<_Uf...>, __tuple_types<_Tf...>, __tuple_indices<_Ul...>, __tuple_types<_Tl...>, _Up&&... __u)
|
||||
_NOEXCEPT_(__all<is_nothrow_constructible<_Tf, _Up>::value...>::value&&
|
||||
__all<is_nothrow_default_constructible<_Tl>::value...>::value)
|
||||
__tuple_indices<_Uf...>,
|
||||
__tuple_types<_Tf...>,
|
||||
__tuple_indices<_Ul...>,
|
||||
__tuple_types<_Tl...>,
|
||||
_Up&&... __u) noexcept(__all<is_nothrow_constructible<_Tf, _Up>::value...>::value &&
|
||||
__all<is_nothrow_default_constructible<_Tl>::value...>::value)
|
||||
: __tuple_leaf<_Uf, _Tf>(std::forward<_Up>(__u))..., __tuple_leaf<_Ul, _Tl>()... {}
|
||||
|
||||
template <class _Alloc, size_t... _Uf, class... _Tf, size_t... _Ul, class... _Tl, class... _Up>
|
||||
@ -474,7 +477,7 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp.
|
||||
__tuple_leaf<_Ul, _Tl>(__uses_alloc_ctor<_Tl, _Alloc>(), __a)... {}
|
||||
|
||||
template <class _Tuple, __enable_if_t<__tuple_constructible<_Tuple, tuple<_Tp...> >::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __tuple_impl(_Tuple&& __t) _NOEXCEPT_(
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __tuple_impl(_Tuple&& __t) noexcept(
|
||||
(__all<is_nothrow_constructible<
|
||||
_Tp,
|
||||
typename tuple_element<_Indx, typename __make_tuple_types<_Tuple>::type>::type>::value...>::value))
|
||||
@ -495,13 +498,13 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp.
|
||||
__tuple_impl(const __tuple_impl&) = default;
|
||||
__tuple_impl(__tuple_impl&&) = default;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void swap(__tuple_impl& __t)
|
||||
_NOEXCEPT_(__all<__is_nothrow_swappable_v<_Tp>...>::value) {
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
|
||||
swap(__tuple_impl& __t) noexcept(__all<__is_nothrow_swappable_v<_Tp>...>::value) {
|
||||
std::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...);
|
||||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void swap(const __tuple_impl& __t) const
|
||||
_NOEXCEPT_(__all<__is_nothrow_swappable_v<const _Tp>...>::value) {
|
||||
noexcept(__all<__is_nothrow_swappable_v<const _Tp>...>::value) {
|
||||
std::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<const __tuple_leaf<_Indx, _Tp>&>(__t))...);
|
||||
}
|
||||
};
|
||||
@ -545,8 +548,8 @@ public:
|
||||
template <template <class...> class _IsImpDefault = __is_implicitly_default_constructible,
|
||||
template <class...> class _IsDefault = is_default_constructible,
|
||||
__enable_if_t< _And< _IsDefault<_Tp>... >::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit(_Not<_Lazy<_And, _IsImpDefault<_Tp>...> >::value) tuple()
|
||||
_NOEXCEPT_(_And<is_nothrow_default_constructible<_Tp>...>::value) {}
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr explicit(_Not<_Lazy<_And, _IsImpDefault<_Tp>...> >::value)
|
||||
tuple() noexcept(_And<is_nothrow_default_constructible<_Tp>...>::value) {}
|
||||
|
||||
template <class _Alloc,
|
||||
template <class...> class _IsImpDefault = __is_implicitly_default_constructible,
|
||||
@ -566,7 +569,7 @@ public:
|
||||
__enable_if_t< _And< _BoolConstant<sizeof...(_Tp) >= 1>, is_copy_constructible<_Tp>... >::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(_Not<_Lazy<_And, is_convertible<const _Tp&, _Tp>...> >::value)
|
||||
tuple(const _Tp&... __t) _NOEXCEPT_(_And<is_nothrow_copy_constructible<_Tp>...>::value)
|
||||
tuple(const _Tp&... __t) noexcept(_And<is_nothrow_copy_constructible<_Tp>...>::value)
|
||||
: __base_(typename __make_tuple_indices<sizeof...(_Tp)>::type(),
|
||||
typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
|
||||
typename __make_tuple_indices<0>::type(),
|
||||
@ -603,7 +606,7 @@ public:
|
||||
__enable_if_t< _And< _BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>, _EnableUTypesCtor<_Up...> >::value,
|
||||
int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> >::value)
|
||||
tuple(_Up&&... __u) _NOEXCEPT_(_And<is_nothrow_constructible<_Tp, _Up>...>::value)
|
||||
tuple(_Up&&... __u) noexcept(_And<is_nothrow_constructible<_Tp, _Up>...>::value)
|
||||
: __base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
|
||||
typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
|
||||
typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
|
||||
@ -670,7 +673,7 @@ public:
|
||||
template <class... _Up, __enable_if_t< _And< _EnableCtorFromUTypesTuple<const tuple<_Up...>&> >::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(_Not<_Lazy<_And, is_convertible<const _Up&, _Tp>...> >::value)
|
||||
tuple(const tuple<_Up...>& __t) _NOEXCEPT_(_And<is_nothrow_constructible<_Tp, const _Up&>...>::value)
|
||||
tuple(const tuple<_Up...>& __t) noexcept(_And<is_nothrow_constructible<_Tp, const _Up&>...>::value)
|
||||
: __base_(__t) {}
|
||||
|
||||
template <class... _Up,
|
||||
@ -697,7 +700,7 @@ public:
|
||||
// tuple(tuple<U...>&&) constructors (including allocator_arg_t variants)
|
||||
template <class... _Up, __enable_if_t< _And< _EnableCtorFromUTypesTuple<tuple<_Up...>&&> >::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> >::value)
|
||||
tuple(tuple<_Up...>&& __t) _NOEXCEPT_(_And<is_nothrow_constructible<_Tp, _Up>...>::value)
|
||||
tuple(tuple<_Up...>&& __t) noexcept(_And<is_nothrow_constructible<_Tp, _Up>...>::value)
|
||||
: __base_(std::move(__t)) {}
|
||||
|
||||
template <class _Alloc,
|
||||
@ -754,7 +757,7 @@ public:
|
||||
__enable_if_t< _And< _EnableCtorFromPair<const pair<_Up1, _Up2>&> >::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(_Not<_BothImplicitlyConvertible<const pair<_Up1, _Up2>&> >::value)
|
||||
tuple(const pair<_Up1, _Up2>& __p) _NOEXCEPT_(_NothrowConstructibleFromPair<const pair<_Up1, _Up2>&>::value)
|
||||
tuple(const pair<_Up1, _Up2>& __p) noexcept(_NothrowConstructibleFromPair<const pair<_Up1, _Up2>&>::value)
|
||||
: __base_(__p) {}
|
||||
|
||||
template <class _Alloc,
|
||||
@ -792,7 +795,7 @@ public:
|
||||
__enable_if_t< _And< _EnableCtorFromPair<pair<_Up1, _Up2>&&> >::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(_Not<_BothImplicitlyConvertible<pair<_Up1, _Up2>&&> >::value)
|
||||
tuple(pair<_Up1, _Up2>&& __p) _NOEXCEPT_(_NothrowConstructibleFromPair<pair<_Up1, _Up2>&&>::value)
|
||||
tuple(pair<_Up1, _Up2>&& __p) noexcept(_NothrowConstructibleFromPair<pair<_Up1, _Up2>&&>::value)
|
||||
: __base_(std::move(__p)) {}
|
||||
|
||||
template <class _Alloc,
|
||||
@ -825,7 +828,7 @@ public:
|
||||
// [tuple.assign]
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple&
|
||||
operator=(_If<_And<is_copy_assignable<_Tp>...>::value, tuple, __nat> const& __tuple)
|
||||
_NOEXCEPT_(_And<is_nothrow_copy_assignable<_Tp>...>::value) {
|
||||
noexcept(_And<is_nothrow_copy_assignable<_Tp>...>::value) {
|
||||
std::__memberwise_copy_assign(*this, __tuple, typename __make_tuple_indices<sizeof...(_Tp)>::type());
|
||||
return *this;
|
||||
}
|
||||
@ -849,7 +852,7 @@ public:
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple&
|
||||
operator=(_If<_And<is_move_assignable<_Tp>...>::value, tuple, __nat>&& __tuple)
|
||||
_NOEXCEPT_(_And<is_nothrow_move_assignable<_Tp>...>::value) {
|
||||
noexcept(_And<is_nothrow_move_assignable<_Tp>...>::value) {
|
||||
std::__memberwise_forward_assign(
|
||||
*this, std::move(__tuple), __tuple_types<_Tp...>(), typename __make_tuple_indices<sizeof...(_Tp)>::type());
|
||||
return *this;
|
||||
@ -860,7 +863,7 @@ public:
|
||||
__enable_if_t< _And< _BoolConstant<sizeof...(_Tp) == sizeof...(_Up)>, is_assignable<_Tp&, _Up const&>... >::value,
|
||||
int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(tuple<_Up...> const& __tuple)
|
||||
_NOEXCEPT_(_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value) {
|
||||
noexcept(_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value) {
|
||||
std::__memberwise_copy_assign(*this, __tuple, typename __make_tuple_indices<sizeof...(_Tp)>::type());
|
||||
return *this;
|
||||
}
|
||||
@ -869,7 +872,7 @@ public:
|
||||
__enable_if_t< _And< _BoolConstant<sizeof...(_Tp) == sizeof...(_Up)>, is_assignable<_Tp&, _Up>... >::value,
|
||||
int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(tuple<_Up...>&& __tuple)
|
||||
_NOEXCEPT_(_And<is_nothrow_assignable<_Tp&, _Up>...>::value) {
|
||||
noexcept(_And<is_nothrow_assignable<_Tp&, _Up>...>::value) {
|
||||
std::__memberwise_forward_assign(
|
||||
*this, std::move(__tuple), __tuple_types<_Up...>(), typename __make_tuple_indices<sizeof...(_Tp)>::type());
|
||||
return *this;
|
||||
@ -934,7 +937,7 @@ public:
|
||||
class _Up2,
|
||||
__enable_if_t< _EnableAssignFromPair<false, pair<_Up1, _Up2> const&>::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(pair<_Up1, _Up2> const& __pair)
|
||||
_NOEXCEPT_(_NothrowAssignFromPair<false, pair<_Up1, _Up2> const&>::value) {
|
||||
noexcept(_NothrowAssignFromPair<false, pair<_Up1, _Up2> const&>::value) {
|
||||
std::get<0>(*this) = __pair.first;
|
||||
std::get<1>(*this) = __pair.second;
|
||||
return *this;
|
||||
@ -942,7 +945,7 @@ public:
|
||||
|
||||
template <class _Up1, class _Up2, __enable_if_t< _EnableAssignFromPair<false, pair<_Up1, _Up2>&&>::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(pair<_Up1, _Up2>&& __pair)
|
||||
_NOEXCEPT_(_NothrowAssignFromPair<false, pair<_Up1, _Up2>&&>::value) {
|
||||
noexcept(_NothrowAssignFromPair<false, pair<_Up1, _Up2>&&>::value) {
|
||||
std::get<0>(*this) = std::forward<_Up1>(__pair.first);
|
||||
std::get<1>(*this) = std::forward<_Up2>(__pair.second);
|
||||
return *this;
|
||||
@ -954,7 +957,7 @@ public:
|
||||
size_t _Np,
|
||||
__enable_if_t< _And< _BoolConstant<_Np == sizeof...(_Tp)>, is_assignable<_Tp&, _Up const&>... >::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(array<_Up, _Np> const& __array)
|
||||
_NOEXCEPT_(_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value) {
|
||||
noexcept(_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value) {
|
||||
std::__memberwise_copy_assign(*this, __array, typename __make_tuple_indices<sizeof...(_Tp)>::type());
|
||||
return *this;
|
||||
}
|
||||
@ -965,7 +968,7 @@ public:
|
||||
class = void,
|
||||
__enable_if_t< _And< _BoolConstant<_Np == sizeof...(_Tp)>, is_assignable<_Tp&, _Up>... >::value, int> = 0>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(array<_Up, _Np>&& __array)
|
||||
_NOEXCEPT_(_And<is_nothrow_assignable<_Tp&, _Up>...>::value) {
|
||||
noexcept(_And<is_nothrow_assignable<_Tp&, _Up>...>::value) {
|
||||
std::__memberwise_forward_assign(
|
||||
*this,
|
||||
std::move(__array),
|
||||
@ -976,7 +979,7 @@ public:
|
||||
|
||||
// [tuple.swap]
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(tuple& __t)
|
||||
_NOEXCEPT_(__all<__is_nothrow_swappable_v<_Tp>...>::value) {
|
||||
noexcept(__all<__is_nothrow_swappable_v<_Tp>...>::value) {
|
||||
__base_.swap(__t.__base_);
|
||||
}
|
||||
|
||||
@ -1035,7 +1038,7 @@ tuple(allocator_arg_t, _Alloc, tuple<_Tp...>) -> tuple<_Tp...>;
|
||||
|
||||
template <class... _Tp, __enable_if_t<__all<__is_swappable_v<_Tp>...>::value, int> = 0>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(tuple<_Tp...>& __t, tuple<_Tp...>& __u)
|
||||
_NOEXCEPT_(__all<__is_nothrow_swappable_v<_Tp>...>::value) {
|
||||
noexcept(__all<__is_nothrow_swappable_v<_Tp>...>::value) {
|
||||
__t.swap(__u);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user