1 // RUN: %clang_cc1 -std=c++20 -verify %s
3 // expected-no-diagnostics
11 template<typename T
> constexpr void bad_assert_copyable() { T t
; T t2
= t
; }
12 using ineffective
= decltype(bad_assert_copyable
<N
>());
14 template<typename T
> consteval
void assert_copyable() { T t
; T t2
= t
; }
15 // Prior to P1937R2 consteval functions were evaluated even in otherwise
16 // unevaluated context, now this is well-formed.
17 using check
= decltype(assert_copyable
<N
>());
20 __add_rvalue_reference(T
) declval();
22 constexpr auto add1(auto lhs
, auto rhs
) {
25 using T
= decltype(add1(declval
<int>(), declval
<int>()));
27 consteval
auto add2(auto lhs
, auto rhs
) {
30 using T
= decltype(add2(declval
<int>(), declval
<int>()));
31 } // namespace P1937R2