PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / func2.C
blob0116f23d94523aa88dfb327d4b7e0fe22407d50d
1 // { dg-do compile }
3 typedef void (*fptr)();
4 fptr zeroptr = 0;
5 template<typename T, fptr F> struct foo { };
6 template<typename T> struct foo<T,zeroptr> { };
7 // { dg-error "not a valid template argument" "not valid" { target *-*-* } .-1 } 
8 // { dg-message "must be the address" "must be the address " { target *-*-* } .-2 }
10 // The rest is needed to trigger the ICE in 4.0 to 4.3:
11 void f() { }
12 foo<int,&f> m_foo;