// PR c++/53164 // PR c++/105848 // A C++20 version of fn-ptr3a.C using class NTTPs. // { dg-do compile { target c++20 } } template void f(T) { T::fail; } // { dg-error "fail" } struct B_int { void (*P)(int); }; struct B_char { void (&P)(char); }; template struct A { // B.P not called }; template void wrap() { // B.P not called } template void g() { A a; // { dg-message "required from" } wrap(); // { dg-message "required from" } } int main() { g<0>(); }