// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s namespace nodiag { template requires (bool(T())) int A(); template requires (bool(U())) int A(); } // end namespace nodiag namespace diag { namespace orig { template requires true int A(); template int B(); template requires true int C(); } template int orig::A(); // expected-error@-1{{out-of-line declaration of 'A' does not match any declaration in namespace 'diag::orig'}} template requires true int orig::B(); // expected-error@-1{{out-of-line declaration of 'B' does not match any declaration in namespace 'diag::orig'}} template requires (!0) int orig::C(); // expected-error@-1{{out-of-line declaration of 'C' does not match any declaration in namespace 'diag::orig'}} } // end namespace diag namespace nodiag { struct AA { template requires (someFunc(T())) int A(); }; template requires (someFunc(T())) int AA::A() { return sizeof(T); } } // end namespace nodiag namespace diag { template struct TA { template