Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-class3.C

raw
1 // PR c++/103831
2 // { dg-do compile { target c++20 } }
3
4 struct A {
5 constexpr int size() { return 42; } // non-static
6 };
7
8 template<class T>
9 requires (T::size() == 42) // { dg-error "without object" }
10 struct B : T { };
11
12 template struct B<A>; // { dg-error "constraint" }