diff --git a/libcxx/include/__functional_base b/libcxx/include/__functional_base --- a/libcxx/include/__functional_base +++ b/libcxx/include/__functional_base @@ -392,9 +392,9 @@ reference_wrapper(type& __f) _NOEXCEPT : __f_(_VSTD::addressof(__f)) {} #else - template ::value, decltype(__fun(_VSTD::declval<_Up>())) >> + template ::value, decltype(__fun(declval<_Up>())) >> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 - reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(_VSTD::declval<_Up>()))) { + reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(declval<_Up>()))) { type& __f = static_cast<_Up&&>(__u); __f_ = _VSTD::addressof(__f); } diff --git a/libcxx/include/__memory/construct_at.h b/libcxx/include/__memory/construct_at.h --- a/libcxx/include/__memory/construct_at.h +++ b/libcxx/include/__memory/construct_at.h @@ -28,7 +28,7 @@ #if _LIBCPP_STD_VER > 17 template()) _Tp(_VSTD::declval<_Args>()...) + ::new (declval()) _Tp(declval<_Args>()...) )> _LIBCPP_INLINE_VISIBILITY constexpr _Tp* construct_at(_Tp* __location, _Args&& ...__args) { diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -382,15 +382,15 @@ template struct __is_deletable : false_type { }; template -struct __is_deletable<_Ptr, decltype(delete _VSTD::declval<_Ptr>())> : true_type { }; +struct __is_deletable<_Ptr, decltype(delete declval<_Ptr>())> : true_type { }; template struct __is_array_deletable : false_type { }; template -struct __is_array_deletable<_Ptr, decltype(delete[] _VSTD::declval<_Ptr>())> : true_type { }; +struct __is_array_deletable<_Ptr, decltype(delete[] declval<_Ptr>())> : true_type { }; template ()(_VSTD::declval<_Pt>()))> + class = decltype(declval<_Dp>()(declval<_Pt>()))> static true_type __well_formed_deleter_test(int); template diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -817,8 +817,8 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY - decltype((void)_VSTD::declval<_Compare&>()( - _VSTD::declval<_LHS &>(), _VSTD::declval<_RHS &>())) + decltype((void)declval<_Compare&>()( + declval<_LHS &>(), declval<_RHS &>())) __do_compare_assert(int, _LHS & __l, _RHS & __r) { _LIBCPP_ASSERT(!__comp_(__l, __r), "Comparator does not induce a strict weak ordering"); @@ -1678,7 +1678,7 @@ template > inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -decltype(_Impl::__apply(_VSTD::declval<_Iter>())) +decltype(_Impl::__apply(declval<_Iter>())) __unwrap_iter(_Iter __i) _NOEXCEPT { return _Impl::__apply(__i); @@ -3195,7 +3195,7 @@ __output_iter[__k] = *__first; _Distance __sz = __k; for (; __first != __last; ++__first, (void) ++__k) { - _Distance __r = _VSTD::uniform_int_distribution<_Distance>(0, __k)(__g); + _Distance __r = uniform_int_distribution<_Distance>(0, __k)(__g); if (__r < __sz) __output_iter[__r] = *__first; } @@ -3212,8 +3212,7 @@ forward_iterator_tag) { _Distance __unsampled_sz = _VSTD::distance(__first, __last); for (__n = _VSTD::min(__n, __unsampled_sz); __n != 0; ++__first) { - _Distance __r = - _VSTD::uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g); + _Distance __r = uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g); if (__r < __n) { *__output_iter++ = *__first; --__n; diff --git a/libcxx/include/chrono b/libcxx/include/chrono --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -1092,7 +1092,7 @@ (__no_overflow<_Period2, period>::type::den == 1 && !treat_as_floating_point<_Rep2>::value)) >::type* = nullptr) - : __rep_(_VSTD::chrono::duration_cast(__d).count()) {} + : __rep_(chrono::duration_cast(__d).count()) {} // observer @@ -1411,7 +1411,7 @@ time_point<_Clock, _ToDuration> time_point_cast(const time_point<_Clock, _Duration>& __t) { - return time_point<_Clock, _ToDuration>(_VSTD::chrono::duration_cast<_ToDuration>(__t.time_since_epoch())); + return time_point<_Clock, _ToDuration>(chrono::duration_cast<_ToDuration>(__t.time_since_epoch())); } #if _LIBCPP_STD_VER > 14 @@ -1927,13 +1927,13 @@ class weekday_indexed { private: - _VSTD::chrono::weekday __wd; + chrono::weekday __wd; unsigned char __idx; public: weekday_indexed() = default; - inline constexpr weekday_indexed(const _VSTD::chrono::weekday& __wdval, unsigned __idxval) noexcept + inline constexpr weekday_indexed(const chrono::weekday& __wdval, unsigned __idxval) noexcept : __wd{__wdval}, __idx(__idxval) {} - inline constexpr _VSTD::chrono::weekday weekday() const noexcept { return __wd; } + inline constexpr chrono::weekday weekday() const noexcept { return __wd; } inline constexpr unsigned index() const noexcept { return __idx; } inline constexpr bool ok() const noexcept { return __wd.ok() && __idx >= 1 && __idx <= 5; } }; @@ -1949,11 +1949,11 @@ class weekday_last { private: - _VSTD::chrono::weekday __wd; + chrono::weekday __wd; public: - explicit constexpr weekday_last(const _VSTD::chrono::weekday& __val) noexcept + explicit constexpr weekday_last(const chrono::weekday& __val) noexcept : __wd{__val} {} - constexpr _VSTD::chrono::weekday weekday() const noexcept { return __wd; } + constexpr chrono::weekday weekday() const noexcept { return __wd; } constexpr bool ok() const noexcept { return __wd.ok(); } }; diff --git a/libcxx/include/concepts b/libcxx/include/concepts --- a/libcxx/include/concepts +++ b/libcxx/include/concepts @@ -180,8 +180,8 @@ concept common_with = same_as, common_type_t<_Up, _Tp>> && requires { - static_cast>(_VSTD::declval<_Tp>()); - static_cast>(_VSTD::declval<_Up>()); + static_cast>(declval<_Tp>()); + static_cast>(declval<_Up>()); } && common_reference_with< add_lvalue_reference_t, diff --git a/libcxx/include/experimental/functional b/libcxx/include/experimental/functional --- a/libcxx/include/experimental/functional +++ b/libcxx/include/experimental/functional @@ -122,8 +122,8 @@ operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const { return _VSTD::__search(__f, __l, __first_, __last_, __pred_, - typename _VSTD::iterator_traits<_ForwardIterator>::iterator_category(), - typename _VSTD::iterator_traits<_ForwardIterator2>::iterator_category()); + typename iterator_traits<_ForwardIterator>::iterator_category(), + typename iterator_traits<_ForwardIterator2>::iterator_category()); } private: @@ -154,7 +154,7 @@ public: _LIBCPP_INLINE_VISIBILITY - _BMSkipTable(std::size_t __sz, _Value __default, _Hash __hf, _BinaryPredicate __pred) + _BMSkipTable(size_t __sz, _Value __default, _Hash __hf, _BinaryPredicate __pred) : __default_value_(__default), __table(__sz, __hf, __pred) {} _LIBCPP_INLINE_VISIBILITY @@ -179,13 +179,13 @@ typedef _Value value_type; typedef _Key key_type; - typedef typename std::make_unsigned::type unsigned_key_type; - typedef std::array::max()> skip_map; + typedef typename make_unsigned::type unsigned_key_type; + typedef std::array::max()> skip_map; skip_map __table; public: _LIBCPP_INLINE_VISIBILITY - _BMSkipTable(std::size_t /*__sz*/, _Value __default, _Hash /*__hf*/, _BinaryPredicate /*__pred*/) + _BMSkipTable(size_t /*__sz*/, _Value __default, _Hash /*__hf*/, _BinaryPredicate /*__pred*/) { std::fill_n(__table.begin(), __table.size(), __default); } @@ -212,7 +212,7 @@ typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type; typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type; typedef _BMSkipTable::value && // what about enums? + is_integral::value && // what about enums? sizeof(value_type) == 1 && is_same<_Hash, hash>::value && is_same<_BinaryPredicate, equal_to<>>::value @@ -247,7 +247,7 @@ if (__first_ == __last_) return make_pair(__f, __f); // empty pattern // If the pattern is larger than the corpus, we can't find it! - if ( __pattern_length_ > _VSTD::distance (__f, __l)) + if ( __pattern_length_ > _VSTD::distance(__f, __l)) return make_pair(__l, __l); // Do the search @@ -299,11 +299,11 @@ template void __compute_bm_prefix ( _Iterator __f, _Iterator __l, _BinaryPredicate __pred, _Container &__prefix ) { - const std::size_t __count = _VSTD::distance(__f, __l); + const size_t __count = _VSTD::distance(__f, __l); __prefix[0] = 0; - std::size_t __k = 0; - for ( std::size_t __i = 1; __i < __count; ++__i ) + size_t __k = 0; + for ( size_t __i = 1; __i < __count; ++__i ) { while ( __k > 0 && !__pred ( __f[__k], __f[__i] )) __k = __prefix [ __k - 1 ]; @@ -317,22 +317,22 @@ void __build_suffix_table(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l, _BinaryPredicate __pred) { - const std::size_t __count = _VSTD::distance(__f, __l); + const size_t __count = _VSTD::distance(__f, __l); vector & __suffix = *__suffix_.get(); if (__count > 0) { - _VSTD::vector __scratch(__count); + vector __scratch(__count); __compute_bm_prefix(__f, __l, __pred, __scratch); - for ( std::size_t __i = 0; __i <= __count; __i++ ) + for ( size_t __i = 0; __i <= __count; __i++ ) __suffix[__i] = __count - __scratch[__count-1]; - typedef _VSTD::reverse_iterator<_RandomAccessIterator1> _RevIter; + typedef reverse_iterator<_RandomAccessIterator1> _RevIter; __compute_bm_prefix(_RevIter(__l), _RevIter(__f), __pred, __scratch); - for ( std::size_t __i = 0; __i < __count; __i++ ) + for ( size_t __i = 0; __i < __count; __i++ ) { - const std::size_t __j = __count - __scratch[__i]; + const size_t __j = __count - __scratch[__i]; const difference_type __k = __i - __scratch[__i] + 1; if (__suffix[__j] > __k) @@ -363,7 +363,7 @@ typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type; typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type; typedef _BMSkipTable::value && // what about enums? + is_integral::value && // what about enums? sizeof(value_type) == 1 && is_same<_Hash, hash>::value && is_same<_BinaryPredicate, equal_to<>>::value @@ -399,7 +399,7 @@ if (__first_ == __last_) return make_pair(__f, __f); // empty pattern // If the pattern is larger than the corpus, we can't find it! - if ( __pattern_length_ > _VSTD::distance (__f, __l)) + if ( __pattern_length_ > _VSTD::distance(__f, __l)) return make_pair(__l, __l); // Do the search diff --git a/libcxx/include/experimental/propagate_const b/libcxx/include/experimental/propagate_const --- a/libcxx/include/experimental/propagate_const +++ b/libcxx/include/experimental/propagate_const @@ -135,7 +135,7 @@ class propagate_const { public: - typedef remove_reference_t())> element_type; + typedef remove_reference_t())> element_type; static_assert(!is_array<_Tp>::value, "Instantiation of propagate_const with an array type is ill-formed."); diff --git a/libcxx/include/experimental/type_traits b/libcxx/include/experimental/type_traits --- a/libcxx/include/experimental/type_traits +++ b/libcxx/include/experimental/type_traits @@ -105,7 +105,7 @@ // 3.3.4, Detection idiom template using void_t = void; -struct nonesuch : private _VSTD::__nat { // make nonesuch "not an aggregate" +struct nonesuch : private __nat { // make nonesuch "not an aggregate" ~nonesuch() = delete; nonesuch (nonesuch const&) = delete; void operator=(nonesuch const&) = delete; diff --git a/libcxx/include/functional b/libcxx/include/functional --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -1962,11 +1962,11 @@ // True if _Fun can safely be held in __policy_storage.__small. template struct __use_small_storage - : public _VSTD::integral_constant< + : public integral_constant< bool, sizeof(_Fun) <= sizeof(__policy_storage) && _LIBCPP_ALIGNOF(_Fun) <= _LIBCPP_ALIGNOF(__policy_storage) && - _VSTD::is_trivially_copy_constructible<_Fun>::value && - _VSTD::is_trivially_destructible<_Fun>::value> {}; + is_trivially_copy_constructible<_Fun>::value && + is_trivially_destructible<_Fun>::value> {}; // Policy contains information about how to copy, destroy, and move the // underlying functor. You can think of it as a vtable of sorts. diff --git a/libcxx/include/istream b/libcxx/include/istream --- a/libcxx/include/istream +++ b/libcxx/include/istream @@ -1383,7 +1383,7 @@ template struct __is_istreamable<_Stream, _Tp, decltype( - _VSTD::declval<_Stream>() >> _VSTD::declval<_Tp>(), void() + declval<_Stream>() >> declval<_Tp>(), void() )> : true_type { }; template struct __is_allocator<_Alloc, typename __void_t::type, - typename __void_t().allocate(size_t(0)))>::type + typename __void_t().allocate(size_t(0)))>::type > : true_type {}; diff --git a/libcxx/include/optional b/libcxx/include/optional --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -1030,8 +1030,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() == - _VSTD::declval()), bool>, + is_convertible_v() == + declval()), bool>, bool > operator==(const optional<_Tp>& __x, const optional<_Up>& __y) @@ -1046,8 +1046,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() != - _VSTD::declval()), bool>, + is_convertible_v() != + declval()), bool>, bool > operator!=(const optional<_Tp>& __x, const optional<_Up>& __y) @@ -1062,8 +1062,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() < - _VSTD::declval()), bool>, + is_convertible_v() < + declval()), bool>, bool > operator<(const optional<_Tp>& __x, const optional<_Up>& __y) @@ -1078,8 +1078,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() > - _VSTD::declval()), bool>, + is_convertible_v() > + declval()), bool>, bool > operator>(const optional<_Tp>& __x, const optional<_Up>& __y) @@ -1094,8 +1094,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() <= - _VSTD::declval()), bool>, + is_convertible_v() <= + declval()), bool>, bool > operator<=(const optional<_Tp>& __x, const optional<_Up>& __y) @@ -1110,8 +1110,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() >= - _VSTD::declval()), bool>, + is_convertible_v() >= + declval()), bool>, bool > operator>=(const optional<_Tp>& __x, const optional<_Up>& __y) @@ -1224,8 +1224,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() == - _VSTD::declval()), bool>, + is_convertible_v() == + declval()), bool>, bool > operator==(const optional<_Tp>& __x, const _Up& __v) @@ -1236,8 +1236,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() == - _VSTD::declval()), bool>, + is_convertible_v() == + declval()), bool>, bool > operator==(const _Tp& __v, const optional<_Up>& __x) @@ -1248,8 +1248,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() != - _VSTD::declval()), bool>, + is_convertible_v() != + declval()), bool>, bool > operator!=(const optional<_Tp>& __x, const _Up& __v) @@ -1260,8 +1260,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() != - _VSTD::declval()), bool>, + is_convertible_v() != + declval()), bool>, bool > operator!=(const _Tp& __v, const optional<_Up>& __x) @@ -1272,8 +1272,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() < - _VSTD::declval()), bool>, + is_convertible_v() < + declval()), bool>, bool > operator<(const optional<_Tp>& __x, const _Up& __v) @@ -1284,8 +1284,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() < - _VSTD::declval()), bool>, + is_convertible_v() < + declval()), bool>, bool > operator<(const _Tp& __v, const optional<_Up>& __x) @@ -1296,8 +1296,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() <= - _VSTD::declval()), bool>, + is_convertible_v() <= + declval()), bool>, bool > operator<=(const optional<_Tp>& __x, const _Up& __v) @@ -1308,8 +1308,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() <= - _VSTD::declval()), bool>, + is_convertible_v() <= + declval()), bool>, bool > operator<=(const _Tp& __v, const optional<_Up>& __x) @@ -1320,8 +1320,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() > - _VSTD::declval()), bool>, + is_convertible_v() > + declval()), bool>, bool > operator>(const optional<_Tp>& __x, const _Up& __v) @@ -1332,8 +1332,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() > - _VSTD::declval()), bool>, + is_convertible_v() > + declval()), bool>, bool > operator>(const _Tp& __v, const optional<_Up>& __x) @@ -1344,8 +1344,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() >= - _VSTD::declval()), bool>, + is_convertible_v() >= + declval()), bool>, bool > operator>=(const optional<_Tp>& __x, const _Up& __v) @@ -1356,8 +1356,8 @@ template _LIBCPP_INLINE_VISIBILITY constexpr _EnableIf< - is_convertible_v() >= - _VSTD::declval()), bool>, + is_convertible_v() >= + declval()), bool>, bool > operator>=(const _Tp& __v, const optional<_Up>& __x) diff --git a/libcxx/include/ostream b/libcxx/include/ostream --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -1032,7 +1032,7 @@ template struct __is_ostreamable<_Stream, _Tp, decltype( - _VSTD::declval<_Stream>() << _VSTD::declval<_Tp>(), void() + declval<_Stream>() << declval<_Tp>(), void() )> : true_type { }; template ::value, "_UIntType must be unsigned type"); + static_assert(is_unsigned<_UIntType>::value, "_UIntType must be unsigned type"); public: static _LIBCPP_CONSTEXPR const result_type _Min = __c == 0u ? 1u: 0u; static _LIBCPP_CONSTEXPR const result_type _Max = __m - 1u; @@ -6292,8 +6292,7 @@ if (__p_.size() > 1) { double __s = _VSTD::accumulate(__p_.begin(), __p_.end(), 0.0); - for (_VSTD::vector::iterator __i = __p_.begin(), __e = __p_.end(); - __i < __e; ++__i) + for (vector::iterator __i = __p_.begin(), __e = __p_.end(); __i < __e; ++__i) *__i /= __s; vector __t(__p_.size() - 1); _VSTD::partial_sum(__p_.begin(), __p_.end() - 1, __t.begin()); @@ -6312,7 +6311,7 @@ discrete_distribution<_IntType>::param_type::probabilities() const { size_t __n = __p_.size(); - _VSTD::vector __p(__n+1); + vector __p(__n+1); _VSTD::adjacent_difference(__p_.begin(), __p_.end(), __p.begin()); if (__n > 0) __p[__n] = 1 - __p_[__n-1]; diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator --- a/libcxx/include/scoped_allocator +++ b/libcxx/include/scoped_allocator @@ -375,7 +375,7 @@ { typedef typename remove_reference < - decltype(_VSTD::declval<_Alloc>().outer_allocator()) + decltype(declval<_Alloc>().outer_allocator()) >::type _OuterAlloc; typedef typename __outermost<_OuterAlloc>::type type; _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -216,9 +216,9 @@ using add_pointer_t = typename add_pointer::type; // C++14 // other transformations: - template + template using aligned_storage_t = typename aligned_storage::type; // C++14 - template + template using aligned_union_t = typename aligned_union::type; // C++14 template using remove_cvref_t = typename remove_cvref::type; // C++20 @@ -580,7 +580,7 @@ #ifdef __clang__ __is_same(_Tp, _Up) #else - _VSTD::is_same<_Tp, _Up>::value + is_same<_Tp, _Up>::value #endif >; @@ -589,7 +589,7 @@ #ifdef __clang__ !__is_same(_Tp, _Up) #else - !_VSTD::is_same<_Tp, _Up>::value + !is_same<_Tp, _Up>::value #endif >; @@ -1344,7 +1344,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP template -decltype(_VSTD::__declval<_Tp>(0)) +decltype(__declval<_Tp>(0)) declval() _NOEXCEPT; // __uncvref @@ -1712,7 +1712,7 @@ template struct __is_convertible_test<_From, _To, - decltype(_VSTD::__is_convertible_imp::__test_convert<_To>(_VSTD::declval<_From>()))> : public true_type + decltype(__is_convertible_imp::__test_convert<_To>(declval<_From>()))> : public true_type {}; template ::value, @@ -2323,7 +2323,7 @@ #if _LIBCPP_STD_VER > 17 // Let COND_RES(X, Y) be: template -using __cond_type = decltype(false ? _VSTD::declval<_Tp>() : _VSTD::declval<_Up>()); +using __cond_type = decltype(false ? declval<_Tp>() : declval<_Up>()); template struct __common_type3 {}; @@ -2346,11 +2346,11 @@ template struct __common_type2_imp<_Tp, _Up, typename __void_t() : _VSTD::declval<_Up>() + true ? declval<_Tp>() : declval<_Up>() )>::type> { typedef _LIBCPP_NODEBUG_TYPE typename decay() : _VSTD::declval<_Up>() + true ? declval<_Tp>() : declval<_Up>() )>::type type; }; @@ -2488,7 +2488,7 @@ // Let COND_RES(X, Y) be: template using __cond_res = - decltype(false ? _VSTD::declval<_Xp(&)()>()() : _VSTD::declval<_Yp(&)()>()()); + decltype(false ? declval<_Xp(&)()>()() : declval<_Yp(&)()>()()); // Let `XREF(A)` denote a unary alias template `T` such that `T` denotes the same type as `U` // with the addition of `A`'s cv and reference qualifiers, for a non-reference cv-unqualified type @@ -2657,7 +2657,7 @@ #else // __has_keyword(__is_assignable) template -typename __select_2nd() = _VSTD::declval<_Arg>())), true_type>::type +typename __select_2nd() = declval<_Arg>())), true_type>::type __is_assignable_test(int); template @@ -2738,7 +2738,7 @@ struct __is_destructor_wellformed { template static char __test ( - typename __is_destructible_apply().~_Tp1())>::type + typename __is_destructible_apply().~_Tp1())>::type ); template @@ -2752,33 +2752,33 @@ template struct __destructible_imp<_Tp, false> - : public _VSTD::integral_constant::type>::value> {}; + : public integral_constant::type>::value> {}; template struct __destructible_imp<_Tp, true> - : public _VSTD::true_type {}; + : public true_type {}; template struct __destructible_false; template -struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, _VSTD::is_reference<_Tp>::value> {}; +struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, is_reference<_Tp>::value> {}; template -struct __destructible_false<_Tp, true> : public _VSTD::false_type {}; +struct __destructible_false<_Tp, true> : public false_type {}; template struct is_destructible - : public __destructible_false<_Tp, _VSTD::is_function<_Tp>::value> {}; + : public __destructible_false<_Tp, is_function<_Tp>::value> {}; template struct is_destructible<_Tp[]> - : public _VSTD::false_type {}; + : public false_type {}; template <> struct is_destructible - : public _VSTD::false_type {}; + : public false_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template @@ -3108,11 +3108,11 @@ // NOTE: The static_cast implementation below is required to support // classes with explicit conversion operators. template (_VSTD::declval<_From>()))> + class = decltype(__eat<_To>(declval<_From>()))> static true_type __test_cast(int); template (_VSTD::declval<_From>()))> + class = decltype(static_cast<_To>(declval<_From>()))> static integral_constant::value && !__is_invalid_lvalue_to_rvalue_cast<_To, _From>::value @@ -3122,12 +3122,12 @@ static false_type __test_cast(...); template ()...))> + class = decltype(_Tp(declval<_Args>()...))> static true_type __test_nary(int); template static false_type __test_nary(...); - template ()))> + template ()))> static is_destructible<_Tp> __test_unary(int); template static false_type __test_unary(...); @@ -3556,7 +3556,7 @@ template struct __libcpp_is_nothrow_assignable - : public integral_constant() = _VSTD::declval<_Arg>()) > + : public integral_constant() = declval<_Arg>()) > { }; @@ -3613,7 +3613,7 @@ template struct __libcpp_is_nothrow_destructible - : public integral_constant().~_Tp()) > + : public integral_constant().~_Tp()) > { }; @@ -3939,7 +3939,7 @@ { template static auto __try_call(int) -> decltype( - _VSTD::__invoke(_VSTD::declval<_XFp>(), _VSTD::declval<_XArgs>()...)); + _VSTD::__invoke(declval<_XFp>(), declval<_XArgs>()...)); template static __nat __try_call(...); @@ -3976,14 +3976,14 @@ static void __test_noexcept(_Tp) noexcept; static const bool value = noexcept(_ThisT::__test_noexcept<_Ret>( - _VSTD::__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...))); + _VSTD::__invoke(declval<_Fp>(), declval<_Args>()...))); }; template struct __nothrow_invokable_r_imp { static const bool value = noexcept( - _VSTD::__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...)); + _VSTD::__invoke(declval<_Fp>(), declval<_Args>()...)); }; template @@ -4056,7 +4056,7 @@ template struct __result_of_mdp<_Rp _Class::*, _Tp, false> { - using type = typename __apply_cv()), _Rp>::type&; + using type = typename __apply_cv()), _Rp>::type&; }; template @@ -4212,8 +4212,8 @@ void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) // _NOEXCEPT_(_NOEXCEPT_(swap(*__a, *__b))) - _NOEXCEPT_(_NOEXCEPT_(swap(*_VSTD::declval<_ForwardIterator1>(), - *_VSTD::declval<_ForwardIterator2>()))) + _NOEXCEPT_(_NOEXCEPT_(swap(*declval<_ForwardIterator1>(), + *declval<_ForwardIterator2>()))) { swap(*__a, *__b); } @@ -4229,7 +4229,7 @@ struct __swappable_with { template - static decltype(swap(_VSTD::declval<_LHS>(), _VSTD::declval<_RHS>())) + static decltype(swap(declval<_LHS>(), declval<_RHS>())) __test_swap(int); template static __nat __test_swap(long); @@ -4249,8 +4249,8 @@ struct __nothrow_swappable_with { static const bool value = #ifndef _LIBCPP_HAS_NO_NOEXCEPT - noexcept(swap(_VSTD::declval<_Tp>(), _VSTD::declval<_Up>())) - && noexcept(swap(_VSTD::declval<_Up>(), _VSTD::declval<_Tp>())); + noexcept(swap(declval<_Tp>(), declval<_Up>())) + && noexcept(swap(declval<_Up>(), declval<_Tp>())); #else false; #endif @@ -4400,7 +4400,7 @@ { template static auto __test(int) - -> typename __select_2nd().operator&()), true_type>::type; + -> typename __select_2nd().operator&()), true_type>::type; template static auto __test(long) -> false_type; @@ -4412,7 +4412,7 @@ { template static auto __test(int) - -> typename __select_2nd())), true_type>::type; + -> typename __select_2nd())), true_type>::type; template static auto __test(long) -> false_type; diff --git a/libcxx/include/variant b/libcxx/include/variant --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -1182,7 +1182,7 @@ template static auto __test_impl(_Dest (&&)[1]) -> __identity<_Dest>; template - using _Apply _LIBCPP_NODEBUG_TYPE = decltype(__test_impl<_Dest>({_VSTD::declval<_Source>()})); + using _Apply _LIBCPP_NODEBUG_TYPE = decltype(__test_impl<_Dest>({declval<_Source>()})); }; template @@ -1678,7 +1678,7 @@ template < class _Visitor, class... _Vs, - typename = void_t()))...> > + typename = void_t()))...> > inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) { @@ -1691,7 +1691,7 @@ #if _LIBCPP_STD_VER > 17 template < class _Rp, class _Visitor, class... _Vs, - typename = void_t()))...> > + typename = void_t()))...> > inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr _Rp visit(_Visitor&& __visitor, _Vs&&... __vs) { diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp @@ -24,7 +24,7 @@ // expected-error@random:* {{static_assert failed due to requirement '1ULL == 0 || 1ULL < 1ULL' "linear_congruential_engine invalid parameters"}} std::linear_congruential_engine e3; std::linear_congruential_engine e4; - // expected-error-re@random:* {{static_assert failed due to requirement 'std:{{.*}}:is_unsigned::value' "_UIntType must be unsigned type"}} + // expected-error@random:* {{static_assert failed due to requirement 'is_unsigned::value' "_UIntType must be unsigned type"}} std::linear_congruential_engine e5; return 0;