// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
namespacenodiag{template<typename T>requires(bool(T()))intA();template<typename U>requires(bool(U()))intA();}// end namespace nodiag
namespacediag{namespaceorig{template<typename T> requires true
int A();template<typename T>intB();template<typename T> requires true
int C();}template<typename T>intorig::A();// expected-error@-1{{out-of-line declaration of 'A' does not match any declaration in namespace 'diag::orig'}}
template<typename T> requires true
int orig::B();// expected-error@-1{{out-of-line declaration of 'B' does not match any declaration in namespace 'diag::orig'}}
template<typename T>requires(!0)intorig::C();// expected-error@-1{{out-of-line declaration of 'C' does not match any declaration in namespace 'diag::orig'}}
}// end namespace diag
namespacenodiag{structAA{template<typename T>requires(someFunc(T()))intA();};template<typename T>requires(someFunc(T()))intAA::A(){returnsizeof(T);}}// end namespace nodiag
namespacediag{template<unsigned N>structTA{template<template<unsigned>class TT> requires TT<N>::happy
intA();};template<unsigned N>template<template<unsigned>class TT>intTA<N>::A(){returnsizeof(TT<N>);}// expected-error@-1{{out-of-line definition of 'A' does not match any declaration in 'TA<N>'}}
}// end namespace diag