gcc/testsuite/g++.dg/template/mem-spec2.C
raw| 1 | // PR c++/94529 |
| 2 | |
| 3 | template <class T> |
| 4 | struct foo { |
| 5 | // the issue is const here |
| 6 | void bar(T& foobar) const { foobar = 0; } // { dg-message "candidate" } |
| 7 | }; |
| 8 | |
| 9 | template <> void |
| 10 | foo<int>::bar(int& foobar) { foobar = 9; } // { dg-error "does not match" } |
| 11 | // { dg-bogus "member function template" "" { target *-*-* } .-1 } |