diff --git a/libcxx/include/__functional_base b/libcxx/include/__functional_base index c91252909ee8..7bd40b96a7e1 100644 --- a/libcxx/include/__functional_base +++ b/libcxx/include/__functional_base @@ -392,9 +392,9 @@ public: 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 index 741b5c291c50..8cd7d5e5d67a 100644 --- a/libcxx/include/__memory/construct_at.h +++ b/libcxx/include/__memory/construct_at.h @@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD #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 index 0079a1fd5365..646c79a88b17 100644 --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -382,15 +382,15 @@ struct __compatible_with 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 index 7b1191cf1445..7bb6d9e0ec2f 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -817,8 +817,8 @@ struct __debug_less 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 @@ struct __unwrap_iter_impl<_Iter, true> { 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); diff --git a/libcxx/include/concepts b/libcxx/include/concepts index 7195b3bb05a3..6c8f325af8af 100644 --- a/libcxx/include/concepts +++ b/libcxx/include/concepts @@ -180,8 +180,8 @@ template 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/propagate_const b/libcxx/include/experimental/propagate_const index 59f50c5e574d..ce4b879b7eab 100644 --- a/libcxx/include/experimental/propagate_const +++ b/libcxx/include/experimental/propagate_const @@ -135,7 +135,7 @@ template 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/istream b/libcxx/include/istream index 8369a5018d6f..b1b31845c047 100644 --- a/libcxx/include/istream +++ b/libcxx/include/istream @@ -1383,7 +1383,7 @@ struct __is_istreamable : false_type { }; 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 index 19e20e0db6cb..0c2fc8d9912c 100644 --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -1030,8 +1030,8 @@ template 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 @@ operator==(const optional<_Tp>& __x, const optional<_Up>& __y) 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 @@ operator!=(const optional<_Tp>& __x, const optional<_Up>& __y) 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 @@ operator<(const optional<_Tp>& __x, const optional<_Up>& __y) 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 @@ operator>(const optional<_Tp>& __x, const optional<_Up>& __y) 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 @@ operator<=(const optional<_Tp>& __x, const optional<_Up>& __y) 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 @@ operator>=(nullopt_t, const optional<_Tp>& __x) noexcept 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 @@ operator==(const optional<_Tp>& __x, const _Up& __v) 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 @@ operator==(const _Tp& __v, const optional<_Up>& __x) 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 @@ operator!=(const optional<_Tp>& __x, const _Up& __v) 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 @@ operator!=(const _Tp& __v, const optional<_Up>& __x) 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 @@ operator<(const optional<_Tp>& __x, const _Up& __v) 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 @@ operator<(const _Tp& __v, const optional<_Up>& __x) 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 @@ operator<=(const optional<_Tp>& __x, const _Up& __v) 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 @@ operator<=(const _Tp& __v, const optional<_Up>& __x) 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 @@ operator>(const optional<_Tp>& __x, const _Up& __v) 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 @@ operator>(const _Tp& __v, const optional<_Up>& __x) 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 @@ operator>=(const optional<_Tp>& __x, const _Up& __v) 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 index 2dc466fb39d8..af50680f9a7c 100644 --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -1032,7 +1032,7 @@ struct __is_ostreamable : false_type { }; template struct __is_ostreamable<_Stream, _Tp, decltype( - _VSTD::declval<_Stream>() << _VSTD::declval<_Tp>(), void() + declval<_Stream>() << declval<_Tp>(), void() )> : true_type { }; template { 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 index f77ab46b93e5..6849924ae449 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -1712,7 +1712,7 @@ struct __is_convertible_test : public false_type {}; template struct __is_convertible_test<_From, _To, - decltype(_VSTD::__is_convertible_imp::__test_convert<_To>(_VSTD::declval<_From>()))> : public true_type + decltype(_VSTD::__is_convertible_imp::__test_convert<_To>(declval<_From>()))> : public true_type {}; template ::value, @@ -2323,7 +2323,7 @@ template using void_t = void; #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 @@ struct __common_type2_imp {}; 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 @@ using __copy_cvref_t = typename __copy_cvref<_From, _To>::type; // 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 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_assignable_v = __is_assignable(_Tp, #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 @@ template struct __is_destructor_wellformed { template static char __test ( - typename __is_destructible_apply().~_Tp1())>::type + typename __is_destructible_apply().~_Tp1())>::type ); template @@ -3108,11 +3108,11 @@ struct __is_constructible_helper // 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 @@ struct __is_constructible_helper 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 @@ struct __libcpp_is_nothrow_assignable template struct __libcpp_is_nothrow_assignable - : public integral_constant() = _VSTD::declval<_Arg>()) > + : public integral_constant() = declval<_Arg>()) > { }; @@ -3613,7 +3613,7 @@ struct __libcpp_is_nothrow_destructible template struct __libcpp_is_nothrow_destructible - : public integral_constant().~_Tp()) > + : public integral_constant().~_Tp()) > { }; @@ -3939,7 +3939,7 @@ struct __invokable_r { 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 @@ struct __nothrow_invokable_r_imp 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 @@ struct __result_of_mdp; 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 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 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 @@ 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 @@ template (), _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 @@ struct __has_operator_addressof_member_imp { 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 @@ struct __has_operator_addressof_free_imp { 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 index 2d4bb7481a9c..426683aa58f3 100644 --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -1182,7 +1182,7 @@ struct __narrowing_check { 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 @@ inline _LIBCPP_INLINE_VISIBILITY 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 @@ inline _LIBCPP_INLINE_VISIBILITY #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) {