// PR c++/96830 // { dg-do compile { target c++20 } } template concept C = true; template requires true struct A { void f(); template void g(); struct B; template struct C; static int D; template static int E; }; template void A::f() { } // { dg-error "different constraints" } template requires true template void A::g() { } // { dg-error "different constraints" } template requires (!!true) struct A::B { }; // { dg-error "different constraints" } template requires true template struct A::C { }; // { dg-error "different constraints" } template int A::D = 0; // { dg-error "different constraints" } template requires true template int A::E = 0; // { dg-error "different constraints" }