PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / ptrmem8.C
blobb759b7077d53a61170c781182d07409f7a7b59e2
1 // { dg-do compile }
2 // Origin: <marco dot franzen at bigfoot dot com> 
3 // PR c++/10126: Handle ptmf default conversions while matching a template 
4 //  argument
6 struct B 
8   int I () const;
9   int I ();
12 struct D : B {};
14 template <int (D::*fun)() const> int Get(); // { dg-message "note" }
16 int main () 
18   Get<&B::I>();   // { dg-error "template argument|converted constant" "not valid" }
19   // { dg-error "no match" "no match" { target *-*-* } .-1 }
20   Get<&D::I>();   // { dg-error "template argument|converted constant" "not valid" }
21   // { dg-error "no match" "no match" { target *-*-* } .-1 }