gcc/testsuite/g++.dg/template/unify7.C
raw| 1 | // Copyright (C) 2004 Free Software Foundation, Inc. |
| 2 | // Contributed by Nathan Sidwell 1 Apr 2004 <[email protected]> |
| 3 | |
| 4 | // PR c++/3518 |
| 5 | template <typename T> void Foo (const T &); |
| 6 | template <typename T> void Baz (const T (*)()); // { dg-message "note" } |
| 7 | |
| 8 | int &f (); |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | Foo (f); |
| 13 | Baz (f); // { dg-error "no matching function" } |
| 14 | // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 } |
| 15 | } |