Debian Codegraph @

gcc/testsuite/g++.dg/concepts/diagnostic10.C

raw
1 // PR c++/67825
2 // { dg-do compile { target concepts } }
3 // { dg-additional-options "-fconcepts-diagnostics-depth=2" }
4
5 template<typename T>
6 requires requires (T t) { t.f; } // { dg-error "invalid use of non-static member function" }
7 void foo() { }
8
9 struct S
10 {
11 int f();
12 };
13
14 void
15 bar()
16 {
17 foo<S>(); // { dg-error "no match" }
18 }