// RUN: %clang_cc1 -std=c++2c -fexperimental-new-constant-interpreter -verify=expected,both %s // RUN: %clang_cc1 -std=c++2c -verify=ref,both %s // both-no-diagnostics namespace std { inline namespace { template struct integral_constant { static const _Tp value = __v; }; template using _BoolConstant = integral_constant; template using __remove_cv_t = __remove_cv(_Tp); template using remove_cv_t = __remove_cv_t<_Tp>; } // namespace inline namespace __1 { template using __libcpp_remove_reference_t = __remove_reference_t(_Tp); template using conditional_t = _IfRes; template using _IsSame = _BoolConstant<__is_same(_Tp, _Up)>; template struct enable_if { typedef _Tp type; }; template using __enable_if_t = _Tp; template constexpr bool is_base_of_v = __is_base_of(_Bp, _Dp); template _Tp __declval(long); template decltype(__declval<_Tp>(0)) declval(); template constexpr decltype(declval<_Fp>()(declval<_Args>()...)) __invoke(_Fp __f, _Args... __args) { return (__f)((__args)...); } template struct __invokable_r { template static decltype(__invoke(declval<_XFp>(), declval<_XArgs>()...)) __try_call(int); using _Result = decltype(__try_call<_Fp, _Args...>(0)); }; template struct __invoke_result : enable_if::_Result> {}; template using invoke_result_t = __invoke_result<_Fn, _Args...>::type; template constexpr __libcpp_remove_reference_t<_Tp> &&move(_Tp &&); template constexpr bool is_convertible_v = __is_convertible(_From, _To); template concept convertible_to = is_convertible_v<_From, _To> && requires { (declval<_From>()); }; template concept __same_as_impl = _IsSame<_Tp, _Up>::value; template concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; template using __remove_cvref_t = __remove_cvref(_Tp); template using remove_cvref_t = __remove_cvref_t<_Tp>; template using __cond_res = decltype(false ? declval<_Xp (&)()>()() : declval<_Yp (&)()>()()); template struct common_reference; template using common_reference_t = common_reference<_Types...>::type; template struct __common_reference_sub_bullet3; template struct common_reference<_Tp, _Up> : __common_reference_sub_bullet3<_Tp, _Up> {}; template requires requires { typename __cond_res<_Tp, _Up>; } struct __common_reference_sub_bullet3<_Tp, _Up> { using type = __cond_res<_Tp, _Up>; }; template concept common_reference_with = same_as, common_reference_t<_Up, _Tp>> && convertible_to<_Tp, common_reference_t<_Tp, _Up>> && convertible_to<_Up, common_reference_t<_Tp, _Up>>; template using __make_const_lvalue_ref = __libcpp_remove_reference_t<_Tp>; template concept assignable_from = common_reference_with<__make_const_lvalue_ref<_Lhs>, __make_const_lvalue_ref<_Rhs>> && requires(_Lhs __lhs, _Rhs __rhs) { { __lhs = (__rhs) }; }; template concept default_initializable = requires { _Tp{}; }; template constexpr bool is_object_v = __is_object(_Tp); template concept derived_from = is_base_of_v<_Bp, _Dp> && is_convertible_v<_Dp *, _Bp *>; template concept __weakly_equality_comparable_with = requires( __make_const_lvalue_ref<_Tp> __t, __make_const_lvalue_ref<_Up> __u) { { __u }; }; template constexpr invoke_result_t<_Fn, _Args...> invoke(_Fn __f, _Args &&...__args) { return __invoke((__f), (__args)...); } template concept invocable = requires(_Fn __fn, _Args... __args) { invoke((__fn), (__args)...); }; template concept regular_invocable = invocable<_Fn, _Args...>; template