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;
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" }