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