diff --git a/libcxx/include/__concepts/common_with.h b/libcxx/include/__concepts/common_with.h --- a/libcxx/include/__concepts/common_with.h +++ b/libcxx/include/__concepts/common_with.h @@ -28,8 +28,8 @@ concept common_with = same_as, common_type_t<_Up, _Tp>> && requires { - static_cast>(declval<_Tp>()); - static_cast>(declval<_Up>()); + static_cast>(std::declval<_Tp>()); + static_cast>(std::declval<_Up>()); } && common_reference_with< add_lvalue_reference_t, diff --git a/libcxx/include/__concepts/convertible_to.h b/libcxx/include/__concepts/convertible_to.h --- a/libcxx/include/__concepts/convertible_to.h +++ b/libcxx/include/__concepts/convertible_to.h @@ -27,7 +27,7 @@ concept convertible_to = is_convertible_v<_From, _To> && requires { - static_cast<_To>(declval<_From>()); + static_cast<_To>(std::declval<_From>()); }; #endif // _LIBCPP_STD_VER > 17 diff --git a/libcxx/include/__functional/invoke.h b/libcxx/include/__functional/invoke.h --- a/libcxx/include/__functional/invoke.h +++ b/libcxx/include/__functional/invoke.h @@ -398,7 +398,7 @@ struct __invokable_r { template - static decltype(std::__invoke(declval<_XFp>(), declval<_XArgs>()...)) __try_call(int); + static decltype(std::__invoke(std::declval<_XFp>(), std::declval<_XArgs>()...)) __try_call(int); template static __nat __try_call(...); @@ -429,14 +429,14 @@ static void __test_noexcept(_Tp) _NOEXCEPT; static const bool value = noexcept(_ThisT::__test_noexcept<_Ret>( - _VSTD::__invoke(declval<_Fp>(), declval<_Args>()...))); + _VSTD::__invoke(std::declval<_Fp>(), std::declval<_Args>()...))); }; template struct __nothrow_invokable_r_imp { static const bool value = noexcept( - _VSTD::__invoke(declval<_Fp>(), declval<_Args>()...)); + _VSTD::__invoke(std::declval<_Fp>(), std::declval<_Args>()...)); }; template diff --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h --- a/libcxx/include/__functional/reference_wrapper.h +++ b/libcxx/include/__functional/reference_wrapper.h @@ -35,9 +35,9 @@ static void __fun(_Tp&&) = delete; public: - template ::value, decltype(__fun(declval<_Up>())) > > + template ::value, decltype(__fun(std::declval<_Up>())) > > _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 - reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(declval<_Up>()))) { + reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(std::declval<_Up>()))) { type& __f = static_cast<_Up&&>(__u); __f_ = _VSTD::addressof(__f); } diff --git a/libcxx/include/__functional/weak_result_type.h b/libcxx/include/__functional/weak_result_type.h --- a/libcxx/include/__functional/weak_result_type.h +++ b/libcxx/include/__functional/weak_result_type.h @@ -283,7 +283,7 @@ template struct __invoke_return { - typedef decltype(_VSTD::__invoke(declval<_Tp>(), declval<_Args>()...)) type; + typedef decltype(_VSTD::__invoke(std::declval<_Tp>(), std::declval<_Args>()...)) type; }; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h --- a/libcxx/include/__iterator/advance.h +++ b/libcxx/include/__iterator/advance.h @@ -54,7 +54,7 @@ template < class _InputIter, class _Distance, - class _IntegralDistance = decltype(_VSTD::__convert_to_integral(declval<_Distance>())), + class _IntegralDistance = decltype(_VSTD::__convert_to_integral(std::declval<_Distance>())), class = __enable_if_t::value> > _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14 void advance(_InputIter& __i, _Distance __orig_n) { diff --git a/libcxx/include/__iterator/incrementable_traits.h b/libcxx/include/__iterator/incrementable_traits.h --- a/libcxx/include/__iterator/incrementable_traits.h +++ b/libcxx/include/__iterator/incrementable_traits.h @@ -52,7 +52,7 @@ template<__has_integral_minus _Tp> requires (!__has_member_difference_type<_Tp>) struct incrementable_traits<_Tp> { - using difference_type = make_signed_t() - declval<_Tp>())>; + using difference_type = make_signed_t() - std::declval<_Tp>())>; }; template diff --git a/libcxx/include/__iterator/move_iterator.h b/libcxx/include/__iterator/move_iterator.h --- a/libcxx/include/__iterator/move_iterator.h +++ b/libcxx/include/__iterator/move_iterator.h @@ -49,7 +49,7 @@ template concept __move_iter_comparable = requires { - { declval() == declval<_Sent>() } -> convertible_to; + { std::declval() == std::declval<_Sent>() } -> convertible_to; }; #endif // _LIBCPP_STD_VER > 17 diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -181,7 +181,7 @@ template struct __has_allocate_hint<_Alloc, _SizeType, _ConstVoidPtr, decltype( - (void)declval<_Alloc>().allocate(declval<_SizeType>(), declval<_ConstVoidPtr>()) + (void)std::declval<_Alloc>().allocate(std::declval<_SizeType>(), std::declval<_ConstVoidPtr>()) )> : true_type { }; // __has_construct @@ -190,7 +190,7 @@ template struct __has_construct_impl().construct(declval<_Args>()...) + (void)std::declval<_Alloc>().construct(std::declval<_Args>()...) ), _Alloc, _Args...> : true_type { }; template @@ -202,7 +202,7 @@ template struct __has_destroy<_Alloc, _Pointer, decltype( - (void)declval<_Alloc>().destroy(declval<_Pointer>()) + (void)std::declval<_Alloc>().destroy(std::declval<_Pointer>()) )> : true_type { }; // __has_max_size @@ -211,7 +211,7 @@ template struct __has_max_size<_Alloc, decltype( - (void)declval<_Alloc&>().max_size() + (void)std::declval<_Alloc&>().max_size() )> : true_type { }; // __has_select_on_container_copy_construction @@ -220,7 +220,7 @@ template struct __has_select_on_container_copy_construction<_Alloc, decltype( - (void)declval<_Alloc>().select_on_container_copy_construction() + (void)std::declval<_Alloc>().select_on_container_copy_construction() )> : true_type { }; _LIBCPP_SUPPRESS_DEPRECATED_POP 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 @@ -29,7 +29,7 @@ #if _LIBCPP_STD_VER > 17 -template ()) _Tp(declval<_Args>()...))> +template ()) _Tp(std::declval<_Args>()...))> _LIBCPP_HIDE_FROM_ABI constexpr _Tp* construct_at(_Tp* __location, _Args&&... __args) { _LIBCPP_ASSERT(__location != nullptr, "null pointer given to construct_at"); return ::new (_VSTD::__voidify(*__location)) _Tp(_VSTD::forward<_Args>(__args)...); @@ -37,7 +37,7 @@ #endif -template ()) _Tp(declval<_Args>()...))> +template ()) _Tp(std::declval<_Args>()...))> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __construct_at(_Tp* __location, _Args&&... __args) { #if _LIBCPP_STD_VER > 17 return std::construct_at(__location, std::forward<_Args>(__args)...); diff --git a/libcxx/include/__memory/ranges_construct_at.h b/libcxx/include/__memory/ranges_construct_at.h --- a/libcxx/include/__memory/ranges_construct_at.h +++ b/libcxx/include/__memory/ranges_construct_at.h @@ -38,7 +38,7 @@ struct __fn { template()) _Tp(declval<_Args>()...) + ::new (std::declval()) _Tp(std::declval<_Args>()...) )> _LIBCPP_HIDE_FROM_ABI constexpr _Tp* operator()(_Tp* __location, _Args&& ...__args) const { 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 @@ -383,15 +383,15 @@ template struct __is_deletable : false_type { }; template -struct __is_deletable<_Ptr, decltype(delete declval<_Ptr>())> : true_type { }; +struct __is_deletable<_Ptr, decltype(delete std::declval<_Ptr>())> : true_type { }; template struct __is_array_deletable : false_type { }; template -struct __is_array_deletable<_Ptr, decltype(delete[] declval<_Ptr>())> : true_type { }; +struct __is_array_deletable<_Ptr, decltype(delete[] std::declval<_Ptr>())> : true_type { }; template ()(declval<_Pt>()))> + class = decltype(std::declval<_Dp>()(std::declval<_Pt>()))> static true_type __well_formed_deleter_test(int); template diff --git a/libcxx/include/__ranges/all.h b/libcxx/include/__ranges/all.h --- a/libcxx/include/__ranges/all.h +++ b/libcxx/include/__ranges/all.h @@ -72,7 +72,7 @@ } // namespace __cpo template -using all_t = decltype(views::all(declval<_Range>())); +using all_t = decltype(views::all(std::declval<_Range>())); } // namespace ranges::views diff --git a/libcxx/include/__ranges/ref_view.h b/libcxx/include/__ranges/ref_view.h --- a/libcxx/include/__ranges/ref_view.h +++ b/libcxx/include/__ranges/ref_view.h @@ -45,7 +45,7 @@ public: template requires __different_from<_Tp, ref_view> && - convertible_to<_Tp, _Range&> && requires { __fun(declval<_Tp>()); } + convertible_to<_Tp, _Range&> && requires { __fun(std::declval<_Tp>()); } _LIBCPP_HIDE_FROM_ABI constexpr ref_view(_Tp&& __t) : __range_(std::addressof(static_cast<_Range&>(std::forward<_Tp>(__t)))) diff --git a/libcxx/include/__ranges/size.h b/libcxx/include/__ranges/size.h --- a/libcxx/include/__ranges/size.h +++ b/libcxx/include/__ranges/size.h @@ -65,7 +65,7 @@ __class_or_enum> && requires(_Tp&& __t) { { ranges::begin(__t) } -> forward_iterator; - { ranges::end(__t) } -> sized_sentinel_for()))>; + { ranges::end(__t) } -> sized_sentinel_for()))>; }; struct __fn { diff --git a/libcxx/include/__type_traits/common_type.h b/libcxx/include/__type_traits/common_type.h --- a/libcxx/include/__type_traits/common_type.h +++ b/libcxx/include/__type_traits/common_type.h @@ -26,7 +26,7 @@ #if _LIBCPP_STD_VER > 17 // Let COND_RES(X, Y) be: template -using __cond_type = decltype(false ? declval<_Tp>() : declval<_Up>()); +using __cond_type = decltype(false ? std::declval<_Tp>() : std::declval<_Up>()); template struct __common_type3 {}; @@ -49,11 +49,11 @@ template struct __common_type2_imp<_Tp, _Up, typename __void_t() : declval<_Up>() + true ? std::declval<_Tp>() : std::declval<_Up>() )>::type> { typedef _LIBCPP_NODEBUG typename decay() : declval<_Up>() + true ? std::declval<_Tp>() : std::declval<_Up>() )>::type type; }; diff --git a/libcxx/include/__type_traits/is_assignable.h b/libcxx/include/__type_traits/is_assignable.h --- a/libcxx/include/__type_traits/is_assignable.h +++ b/libcxx/include/__type_traits/is_assignable.h @@ -33,7 +33,7 @@ #else // __has_builtin(__is_assignable) template -typename __select_2nd() = declval<_Arg>())), true_type>::type +typename __select_2nd() = std::declval<_Arg>())), true_type>::type __is_assignable_test(int); template diff --git a/libcxx/include/__type_traits/is_convertible.h b/libcxx/include/__type_traits/is_convertible.h --- a/libcxx/include/__type_traits/is_convertible.h +++ b/libcxx/include/__type_traits/is_convertible.h @@ -40,7 +40,7 @@ template struct __is_convertible_test<_From, _To, - decltype(__is_convertible_imp::__test_convert<_To>(declval<_From>()))> : public true_type + decltype(__is_convertible_imp::__test_convert<_To>(std::declval<_From>()))> : public true_type {}; template ::value, diff --git a/libcxx/include/__type_traits/is_nothrow_assignable.h b/libcxx/include/__type_traits/is_nothrow_assignable.h --- a/libcxx/include/__type_traits/is_nothrow_assignable.h +++ b/libcxx/include/__type_traits/is_nothrow_assignable.h @@ -37,7 +37,7 @@ template struct __libcpp_is_nothrow_assignable - : public integral_constant() = declval<_Arg>()) > + : public integral_constant() = std::declval<_Arg>()) > { }; diff --git a/libcxx/include/__type_traits/is_nothrow_constructible.h b/libcxx/include/__type_traits/is_nothrow_constructible.h --- a/libcxx/include/__type_traits/is_nothrow_constructible.h +++ b/libcxx/include/__type_traits/is_nothrow_constructible.h @@ -31,7 +31,7 @@ template struct __libcpp_is_nothrow_constructible - : public integral_constant()...))> + : public integral_constant()...))> { }; @@ -40,7 +40,7 @@ template struct __libcpp_is_nothrow_constructible - : public integral_constant(declval<_Arg>()))> + : public integral_constant(std::declval<_Arg>()))> { }; diff --git a/libcxx/include/__type_traits/is_nothrow_convertible.h b/libcxx/include/__type_traits/is_nothrow_convertible.h --- a/libcxx/include/__type_traits/is_nothrow_convertible.h +++ b/libcxx/include/__type_traits/is_nothrow_convertible.h @@ -30,7 +30,7 @@ static void __test_noexcept(_Tp) noexcept; template -static bool_constant(declval<_Fm>()))> +static bool_constant(std::declval<_Fm>()))> __is_nothrow_convertible_test(); template diff --git a/libcxx/include/__type_traits/is_nothrow_destructible.h b/libcxx/include/__type_traits/is_nothrow_destructible.h --- a/libcxx/include/__type_traits/is_nothrow_destructible.h +++ b/libcxx/include/__type_traits/is_nothrow_destructible.h @@ -37,7 +37,7 @@ template struct __libcpp_is_nothrow_destructible - : public integral_constant().~_Tp()) > + : public integral_constant().~_Tp()) > { }; diff --git a/libcxx/include/__type_traits/promote.h b/libcxx/include/__type_traits/promote.h --- a/libcxx/include/__type_traits/promote.h +++ b/libcxx/include/__type_traits/promote.h @@ -36,7 +36,7 @@ static double __test(double); static long double __test(long double); - typedef decltype(__test(declval<_Tp>())) type; + typedef decltype(__test(std::declval<_Tp>())) type; static const bool value = _IsNotSame::value; }; diff --git a/libcxx/include/__utility/declval.h b/libcxx/include/__utility/declval.h --- a/libcxx/include/__utility/declval.h +++ b/libcxx/include/__utility/declval.h @@ -27,7 +27,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP template -decltype(__declval<_Tp>(0)) declval() _NOEXCEPT; +decltype(std::__declval<_Tp>(0)) declval() _NOEXCEPT; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/istream b/libcxx/include/istream --- a/libcxx/include/istream +++ b/libcxx/include/istream @@ -1375,7 +1375,7 @@ template struct __is_istreamable<_Stream, _Tp, decltype( - declval<_Stream>() >> declval<_Tp>(), void() + std::declval<_Stream>() >> std::declval<_Tp>(), void() )> : true_type { }; template -decltype(declval<_Alloc>().outer_allocator(), true_type()) +decltype(std::declval<_Alloc>().outer_allocator(), true_type()) __has_outer_allocator_test(_Alloc&& __a); template @@ -381,7 +381,7 @@ { typedef typename remove_reference < - decltype(declval<_Alloc>().outer_allocator()) + decltype(std::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 @@ -624,7 +624,7 @@ struct __swappable_with { template - static decltype(swap(declval<_LHS>(), declval<_RHS>())) + static decltype(swap(std::declval<_LHS>(), std::declval<_RHS>())) __test_swap(int); template static __nat __test_swap(long); @@ -644,8 +644,8 @@ struct __nothrow_swappable_with { static const bool value = #ifndef _LIBCPP_HAS_NO_NOEXCEPT - noexcept(swap(declval<_Tp>(), declval<_Up>())) - && noexcept(swap(declval<_Up>(), declval<_Tp>())); + noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())) + && noexcept(swap(std::declval<_Up>(), std::declval<_Tp>())); #else false; #endif diff --git a/libcxx/include/variant b/libcxx/include/variant --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -1208,7 +1208,7 @@ template static auto __test_impl(_Dest (&&)[1]) -> __type_identity<_Dest>; template - using _Apply _LIBCPP_NODEBUG = decltype(__test_impl<_Dest>({declval<_Source>()})); + using _Apply _LIBCPP_NODEBUG = decltype(__test_impl<_Dest>({std::declval<_Source>()})); }; template @@ -1704,7 +1704,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) { @@ -1717,7 +1717,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) {