1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// PR c++/108282 // { dg-do compile { target c++20 } } template<class T> concept TEST = requires { T::TT; }; struct C { }; template<class AT> struct B { static void TT() requires TEST<AT>; }; int main() { static_assert( !TEST<C> ); static_assert( !TEST<B<C>> ); B<C>::TT(); // { dg-error "no match" } }