Daily bump.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / concepts-fn4.C
blob4fca936db2b5a7f4494d9bb4bed57d157961e491
1 // Testcase from [expr.prim.id]/5
2 // { dg-do compile { target c++20 } }
4 template<typename T> struct A {
5   static void f(int) requires false;
6 };
7 void g() {
8   A<int>::f(0);                 // { dg-error "" "cannot call f" }
9   void (*p1)(int) = A<int>::f;  // { dg-error "" "cannot take the address of f" }
10   decltype(A<int>::f)* p2 = nullptr; // { dg-error "" "the type decltype(A<int>::f) is invalid" }