72 changes: 36 additions & 36 deletions libcxx/include/optional
Original file line number Diff line number Diff line change
Expand Up @@ -1030,8 +1030,8 @@ template<class T>
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() ==
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() ==
declval<const _Up&>()), bool>,
bool
>
operator==(const optional<_Tp>& __x, const optional<_Up>& __y)
Expand All @@ -1046,8 +1046,8 @@ operator==(const optional<_Tp>& __x, const optional<_Up>& __y)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() !=
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() !=
declval<const _Up&>()), bool>,
bool
>
operator!=(const optional<_Tp>& __x, const optional<_Up>& __y)
Expand All @@ -1062,8 +1062,8 @@ operator!=(const optional<_Tp>& __x, const optional<_Up>& __y)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() <
declval<const _Up&>()), bool>,
bool
>
operator<(const optional<_Tp>& __x, const optional<_Up>& __y)
Expand All @@ -1078,8 +1078,8 @@ operator<(const optional<_Tp>& __x, const optional<_Up>& __y)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() >
declval<const _Up&>()), bool>,
bool
>
operator>(const optional<_Tp>& __x, const optional<_Up>& __y)
Expand All @@ -1094,8 +1094,8 @@ operator>(const optional<_Tp>& __x, const optional<_Up>& __y)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <=
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() <=
declval<const _Up&>()), bool>,
bool
>
operator<=(const optional<_Tp>& __x, const optional<_Up>& __y)
Expand All @@ -1110,8 +1110,8 @@ operator<=(const optional<_Tp>& __x, const optional<_Up>& __y)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >=
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() >=
declval<const _Up&>()), bool>,
bool
>
operator>=(const optional<_Tp>& __x, const optional<_Up>& __y)
Expand Down Expand Up @@ -1224,8 +1224,8 @@ operator>=(nullopt_t, const optional<_Tp>& __x) noexcept
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() ==
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() ==
declval<const _Up&>()), bool>,
bool
>
operator==(const optional<_Tp>& __x, const _Up& __v)
Expand All @@ -1236,8 +1236,8 @@ operator==(const optional<_Tp>& __x, const _Up& __v)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() ==
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() ==
declval<const _Up&>()), bool>,
bool
>
operator==(const _Tp& __v, const optional<_Up>& __x)
Expand All @@ -1248,8 +1248,8 @@ operator==(const _Tp& __v, const optional<_Up>& __x)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() !=
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() !=
declval<const _Up&>()), bool>,
bool
>
operator!=(const optional<_Tp>& __x, const _Up& __v)
Expand All @@ -1260,8 +1260,8 @@ operator!=(const optional<_Tp>& __x, const _Up& __v)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() !=
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() !=
declval<const _Up&>()), bool>,
bool
>
operator!=(const _Tp& __v, const optional<_Up>& __x)
Expand All @@ -1272,8 +1272,8 @@ operator!=(const _Tp& __v, const optional<_Up>& __x)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() <
declval<const _Up&>()), bool>,
bool
>
operator<(const optional<_Tp>& __x, const _Up& __v)
Expand All @@ -1284,8 +1284,8 @@ operator<(const optional<_Tp>& __x, const _Up& __v)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() <
declval<const _Up&>()), bool>,
bool
>
operator<(const _Tp& __v, const optional<_Up>& __x)
Expand All @@ -1296,8 +1296,8 @@ operator<(const _Tp& __v, const optional<_Up>& __x)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <=
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() <=
declval<const _Up&>()), bool>,
bool
>
operator<=(const optional<_Tp>& __x, const _Up& __v)
Expand All @@ -1308,8 +1308,8 @@ operator<=(const optional<_Tp>& __x, const _Up& __v)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <=
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() <=
declval<const _Up&>()), bool>,
bool
>
operator<=(const _Tp& __v, const optional<_Up>& __x)
Expand All @@ -1320,8 +1320,8 @@ operator<=(const _Tp& __v, const optional<_Up>& __x)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() >
declval<const _Up&>()), bool>,
bool
>
operator>(const optional<_Tp>& __x, const _Up& __v)
Expand All @@ -1332,8 +1332,8 @@ operator>(const optional<_Tp>& __x, const _Up& __v)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() >
declval<const _Up&>()), bool>,
bool
>
operator>(const _Tp& __v, const optional<_Up>& __x)
Expand All @@ -1344,8 +1344,8 @@ operator>(const _Tp& __v, const optional<_Up>& __x)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >=
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() >=
declval<const _Up&>()), bool>,
bool
>
operator>=(const optional<_Tp>& __x, const _Up& __v)
Expand All @@ -1356,8 +1356,8 @@ operator>=(const optional<_Tp>& __x, const _Up& __v)
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
_EnableIf<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >=
_VSTD::declval<const _Up&>()), bool>,
is_convertible_v<decltype(declval<const _Tp&>() >=
declval<const _Up&>()), bool>,
bool
>
operator>=(const _Tp& __v, const optional<_Up>& __x)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/ostream
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ struct __is_ostreamable : false_type { };

template <class _Stream, class _Tp>
struct __is_ostreamable<_Stream, _Tp, decltype(
_VSTD::declval<_Stream>() << _VSTD::declval<_Tp>(), void()
declval<_Stream>() << declval<_Tp>(), void()
)> : true_type { };

template <class _Stream, class _Tp, class = typename enable_if<
Expand Down
7 changes: 3 additions & 4 deletions libcxx/include/random
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@ private:

static_assert(__m == 0 || __a < __m, "linear_congruential_engine invalid parameters");
static_assert(__m == 0 || __c < __m, "linear_congruential_engine invalid parameters");
static_assert(_VSTD::is_unsigned<_UIntType>::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;
Expand Down Expand Up @@ -6292,8 +6292,7 @@ discrete_distribution<_IntType>::param_type::__init()
if (__p_.size() > 1)
{
double __s = _VSTD::accumulate(__p_.begin(), __p_.end(), 0.0);
for (_VSTD::vector<double>::iterator __i = __p_.begin(), __e = __p_.end();
__i < __e; ++__i)
for (vector<double>::iterator __i = __p_.begin(), __e = __p_.end(); __i < __e; ++__i)
*__i /= __s;
vector<double> __t(__p_.size() - 1);
_VSTD::partial_sum(__p_.begin(), __p_.end() - 1, __t.begin());
Expand All @@ -6312,7 +6311,7 @@ vector<double>
discrete_distribution<_IntType>::param_type::probabilities() const
{
size_t __n = __p_.size();
_VSTD::vector<double> __p(__n+1);
vector<double> __p(__n+1);
_VSTD::adjacent_difference(__p_.begin(), __p_.end(), __p.begin());
if (__n > 0)
__p[__n] = 1 - __p_[__n-1];
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/scoped_allocator
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ struct __outermost<_Alloc, true>
{
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
Expand Down
74 changes: 37 additions & 37 deletions libcxx/include/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ namespace std
using add_pointer_t = typename add_pointer<T>::type; // C++14
// other transformations:
template <size_t Len, std::size_t Align=default-alignment>
template <size_t Len, size_t Align=default-alignment>
using aligned_storage_t = typename aligned_storage<Len,Align>::type; // C++14
template <std::size_t Len, class... Types>
template <size_t Len, class... Types>
using aligned_union_t = typename aligned_union<Len,Types...>::type; // C++14
template <class T>
using remove_cvref_t = typename remove_cvref<T>::type; // C++20
Expand Down Expand Up @@ -580,7 +580,7 @@ using _IsSame = _BoolConstant<
#ifdef __clang__
__is_same(_Tp, _Up)
#else
_VSTD::is_same<_Tp, _Up>::value
is_same<_Tp, _Up>::value
#endif
>;

Expand All @@ -589,7 +589,7 @@ using _IsNotSame = _BoolConstant<
#ifdef __clang__
!__is_same(_Tp, _Up)
#else
!_VSTD::is_same<_Tp, _Up>::value
!is_same<_Tp, _Up>::value
#endif
>;

Expand Down Expand Up @@ -1344,7 +1344,7 @@ template <class _Tp> _Tp __declval(long);
_LIBCPP_SUPPRESS_DEPRECATED_POP

template <class _Tp>
decltype(_VSTD::__declval<_Tp>(0))
decltype(__declval<_Tp>(0))
declval() _NOEXCEPT;

// __uncvref
Expand Down Expand Up @@ -1712,7 +1712,7 @@ struct __is_convertible_test : public false_type {};

template <class _From, class _To>
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 <class _Tp, bool _IsArray = is_array<_Tp>::value,
Expand Down Expand Up @@ -2323,7 +2323,7 @@ template <class...> using void_t = void;
#if _LIBCPP_STD_VER > 17
// Let COND_RES(X, Y) be:
template <class _Tp, class _Up>
using __cond_type = decltype(false ? _VSTD::declval<_Tp>() : _VSTD::declval<_Up>());
using __cond_type = decltype(false ? declval<_Tp>() : declval<_Up>());

template <class _Tp, class _Up, class = void>
struct __common_type3 {};
Expand All @@ -2346,11 +2346,11 @@ struct __common_type2_imp {};
template <class _Tp, class _Up>
struct __common_type2_imp<_Tp, _Up,
typename __void_t<decltype(
true ? _VSTD::declval<_Tp>() : _VSTD::declval<_Up>()
true ? declval<_Tp>() : declval<_Up>()
)>::type>
{
typedef _LIBCPP_NODEBUG_TYPE typename decay<decltype(
true ? _VSTD::declval<_Tp>() : _VSTD::declval<_Up>()
true ? declval<_Tp>() : declval<_Up>()
)>::type type;
};

Expand Down Expand Up @@ -2488,7 +2488,7 @@ using __copy_cvref_t = typename __copy_cvref<_From, _To>::type;
// Let COND_RES(X, Y) be:
template <class _Xp, class _Yp>
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<U>` denotes the same type as `U`
// with the addition of `A`'s cv and reference qualifiers, for a non-reference cv-unqualified type
Expand Down Expand Up @@ -2657,7 +2657,7 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_assignable_v = __is_assignable(_Tp,
#else // __has_keyword(__is_assignable)

template <class _Tp, class _Arg>
typename __select_2nd<decltype((_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>())), true_type>::type
typename __select_2nd<decltype((declval<_Tp>() = declval<_Arg>())), true_type>::type
__is_assignable_test(int);

template <class, class>
Expand Down Expand Up @@ -2738,7 +2738,7 @@ template <typename _Tp>
struct __is_destructor_wellformed {
template <typename _Tp1>
static char __test (
typename __is_destructible_apply<decltype(_VSTD::declval<_Tp1&>().~_Tp1())>::type
typename __is_destructible_apply<decltype(declval<_Tp1&>().~_Tp1())>::type
);

template <typename _Tp1>
Expand All @@ -2752,33 +2752,33 @@ struct __destructible_imp;

template <class _Tp>
struct __destructible_imp<_Tp, false>
: public _VSTD::integral_constant<bool,
__is_destructor_wellformed<typename _VSTD::remove_all_extents<_Tp>::type>::value> {};
: public integral_constant<bool,
__is_destructor_wellformed<typename remove_all_extents<_Tp>::type>::value> {};

template <class _Tp>
struct __destructible_imp<_Tp, true>
: public _VSTD::true_type {};
: public true_type {};

template <class _Tp, bool>
struct __destructible_false;

template <class _Tp>
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 <class _Tp>
struct __destructible_false<_Tp, true> : public _VSTD::false_type {};
struct __destructible_false<_Tp, true> : public false_type {};

template <class _Tp>
struct is_destructible
: public __destructible_false<_Tp, _VSTD::is_function<_Tp>::value> {};
: public __destructible_false<_Tp, is_function<_Tp>::value> {};

template <class _Tp>
struct is_destructible<_Tp[]>
: public _VSTD::false_type {};
: public false_type {};

template <>
struct is_destructible<void>
: public _VSTD::false_type {};
: public false_type {};

#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Tp>
Expand Down Expand Up @@ -3108,11 +3108,11 @@ struct __is_constructible_helper
// NOTE: The static_cast implementation below is required to support
// classes with explicit conversion operators.
template <class _To, class _From,
class = decltype(__eat<_To>(_VSTD::declval<_From>()))>
class = decltype(__eat<_To>(declval<_From>()))>
static true_type __test_cast(int);

template <class _To, class _From,
class = decltype(static_cast<_To>(_VSTD::declval<_From>()))>
class = decltype(static_cast<_To>(declval<_From>()))>
static integral_constant<bool,
!__is_invalid_base_to_derived_cast<_To, _From>::value &&
!__is_invalid_lvalue_to_rvalue_cast<_To, _From>::value
Expand All @@ -3122,12 +3122,12 @@ struct __is_constructible_helper
static false_type __test_cast(...);

template <class _Tp, class ..._Args,
class = decltype(_Tp(_VSTD::declval<_Args>()...))>
class = decltype(_Tp(declval<_Args>()...))>
static true_type __test_nary(int);
template <class _Tp, class...>
static false_type __test_nary(...);

template <class _Tp, class _A0, class = decltype(::new _Tp(_VSTD::declval<_A0>()))>
template <class _Tp, class _A0, class = decltype(::new _Tp(declval<_A0>()))>
static is_destructible<_Tp> __test_unary(int);
template <class, class>
static false_type __test_unary(...);
Expand Down Expand Up @@ -3556,7 +3556,7 @@ struct __libcpp_is_nothrow_assignable<false, _Tp, _Arg>

template <class _Tp, class _Arg>
struct __libcpp_is_nothrow_assignable<true, _Tp, _Arg>
: public integral_constant<bool, noexcept(_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>()) >
: public integral_constant<bool, noexcept(declval<_Tp>() = declval<_Arg>()) >
{
};

Expand Down Expand Up @@ -3613,7 +3613,7 @@ struct __libcpp_is_nothrow_destructible<false, _Tp>

template <class _Tp>
struct __libcpp_is_nothrow_destructible<true, _Tp>
: public integral_constant<bool, noexcept(_VSTD::declval<_Tp>().~_Tp()) >
: public integral_constant<bool, noexcept(declval<_Tp>().~_Tp()) >
{
};

Expand Down Expand Up @@ -3939,7 +3939,7 @@ struct __invokable_r
{
template <class _XFp, class ..._XArgs>
static auto __try_call(int) -> decltype(
_VSTD::__invoke(_VSTD::declval<_XFp>(), _VSTD::declval<_XArgs>()...));
_VSTD::__invoke(declval<_XFp>(), declval<_XArgs>()...));
template <class _XFp, class ..._XArgs>
static __nat __try_call(...);

Expand Down Expand Up @@ -3976,14 +3976,14 @@ struct __nothrow_invokable_r_imp<true, false, _Ret, _Fp, _Args...>
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 <class _Ret, class _Fp, class ..._Args>
struct __nothrow_invokable_r_imp<true, true, _Ret, _Fp, _Args...>
{
static const bool value = noexcept(
_VSTD::__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...));
_VSTD::__invoke(declval<_Fp>(), declval<_Args>()...));
};

template <class _Ret, class _Fp, class ..._Args>
Expand Down Expand Up @@ -4056,7 +4056,7 @@ struct __result_of_mdp;
template <class _Rp, class _Class, class _Tp>
struct __result_of_mdp<_Rp _Class::*, _Tp, false>
{
using type = typename __apply_cv<decltype(*_VSTD::declval<_Tp>()), _Rp>::type&;
using type = typename __apply_cv<decltype(*declval<_Tp>()), _Rp>::type&;
};

template <class _Rp, class _Class, class _Tp>
Expand Down Expand Up @@ -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);
}
Expand All @@ -4229,7 +4229,7 @@ template <class _Tp, class _Up = _Tp,
struct __swappable_with
{
template <class _LHS, class _RHS>
static decltype(swap(_VSTD::declval<_LHS>(), _VSTD::declval<_RHS>()))
static decltype(swap(declval<_LHS>(), declval<_RHS>()))
__test_swap(int);
template <class, class>
static __nat __test_swap(long);
Expand All @@ -4249,8 +4249,8 @@ template <class _Tp, class _Up = _Tp, bool _Swappable = __swappable_with<_Tp, _U
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
Expand Down Expand Up @@ -4400,7 +4400,7 @@ struct __has_operator_addressof_member_imp
{
template <class _Up>
static auto __test(int)
-> typename __select_2nd<decltype(_VSTD::declval<_Up>().operator&()), true_type>::type;
-> typename __select_2nd<decltype(declval<_Up>().operator&()), true_type>::type;
template <class>
static auto __test(long) -> false_type;

Expand All @@ -4412,7 +4412,7 @@ struct __has_operator_addressof_free_imp
{
template <class _Up>
static auto __test(int)
-> typename __select_2nd<decltype(operator&(_VSTD::declval<_Up>())), true_type>::type;
-> typename __select_2nd<decltype(operator&(declval<_Up>())), true_type>::type;
template <class>
static auto __test(long) -> false_type;

Expand Down
6 changes: 3 additions & 3 deletions libcxx/include/variant
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@ struct __narrowing_check {
template <class _Dest>
static auto __test_impl(_Dest (&&)[1]) -> __identity<_Dest>;
template <class _Dest, class _Source>
using _Apply _LIBCPP_NODEBUG_TYPE = decltype(__test_impl<_Dest>({_VSTD::declval<_Source>()}));
using _Apply _LIBCPP_NODEBUG_TYPE = decltype(__test_impl<_Dest>({declval<_Source>()}));
};

template <class _Dest, class _Source>
Expand Down Expand Up @@ -1678,7 +1678,7 @@ inline _LIBCPP_INLINE_VISIBILITY

template <
class _Visitor, class... _Vs,
typename = void_t<decltype(_VSTD::__as_variant(_VSTD::declval<_Vs>()))...> >
typename = void_t<decltype(_VSTD::__as_variant(declval<_Vs>()))...> >
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr
decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) {
Expand All @@ -1691,7 +1691,7 @@ inline _LIBCPP_INLINE_VISIBILITY
#if _LIBCPP_STD_VER > 17
template <
class _Rp, class _Visitor, class... _Vs,
typename = void_t<decltype(_VSTD::__as_variant(_VSTD::declval<_Vs>()))...> >
typename = void_t<decltype(_VSTD::__as_variant(declval<_Vs>()))...> >
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr _Rp
visit(_Visitor&& __visitor, _Vs&&... __vs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ int main(int, char**)
// expected-error@random:* {{static_assert failed due to requirement '1ULL == 0 || 1ULL < 1ULL' "linear_congruential_engine invalid parameters"}}
std::linear_congruential_engine<T, 0, 1, 1> e3;
std::linear_congruential_engine<T, 1, 0, 1> e4;
// expected-error-re@random:* {{static_assert failed due to requirement 'std:{{.*}}:is_unsigned<int>::value' "_UIntType must be unsigned type"}}
// expected-error@random:* {{static_assert failed due to requirement 'is_unsigned<int>::value' "_UIntType must be unsigned type"}}
std::linear_congruential_engine<int, 0, 0, 0> e5;

return 0;
Expand Down