| 1 |
// Copyright (C) 2005 Free Software Foundation, Inc. |
| 2 |
// Contributed by Nathan Sidwell 7 Jul 2005 <[email protected]> |
| 3 |
|
| 4 |
// Origin:Wolfgang Bangerth <[email protected]> |
| 5 |
// PR 21799: deduction of cvqualifiers on member functions was wrong |
| 6 |
|
| 7 |
template <class T> void f (T &, void (T::*)() ); // { dg-message "note" } |
| 8 |
|
| 9 |
struct X { |
| 10 |
void g() const {} |
| 11 |
}; |
| 12 |
|
| 13 |
const X *x; |
| 14 |
|
| 15 |
int main () { |
| 16 |
f (*x, &X::g); // { dg-error "no matching function" } |
| 17 |
// { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 } |
| 18 |
} |