PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / unify6.C
blob95e24a255a735d536aa9b213aa328b5e73ce3707
1 // Copyright (C) 2004 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 1 Apr 2004 <nathan@codesourcery.com>
4 void Baz ();
6 template <typename T> void Foo1 (T *); // #1
7 template <typename T> void Foo1 (T const *a) {a (1);} // #2
9 template <typename T> T const *Foo2 (T *);
11 template <typename T> void Foo3 (T *, T const * = 0); // { dg-message "note" }
13 void Bar ()
15   Foo1 (&Baz); // #1
17   Foo2 (&Baz);
19   Foo3 (&Baz);
21   Foo3 (&Baz, &Baz); // { dg-error "no matching function" }
22   // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }