1 // RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
5 template <typename T
> requires (bool(T()))
7 template <typename U
> requires (bool(U()))
10 } // end namespace nodiag
15 template <typename T
> requires
true
19 template <typename T
> requires
true
25 // expected-error@-1{{out-of-line declaration of 'A' does not match any declaration in namespace 'diag::orig'}}
26 template <typename T
> requires
true
28 // expected-error@-1{{out-of-line declaration of 'B' does not match any declaration in namespace 'diag::orig'}}
29 template <typename T
> requires (!0)
31 // expected-error@-1{{out-of-line declaration of 'C' does not match any declaration in namespace 'diag::orig'}}
33 } // end namespace diag
38 template <typename T
> requires (someFunc(T()))
42 template <typename T
> requires (someFunc(T()))
43 int AA::A() { return sizeof(T
); }
45 } // end namespace nodiag
50 struct TA
{ // #defined-here
51 template <template <unsigned> class TT
> requires TT
<N
>::happy
56 template <template <unsigned> class TT
> int TA
<N
>::A() { return sizeof(TT
<N
>); }
57 // expected-error@-1{{out-of-line definition of 'A' does not match any declaration in 'TA<N>'}}
58 // expected-note@#defined-here{{defined here}}
60 } // end namespace diag