Debian Codegraph @

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

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