blob: 34e6e95dd67764915c7384b3b10439938724daf1 [file] [log] [blame]
// PR c++/87989
// { dg-do link }
// Resolved to template instantiation rather than non-template fn.
struct X {
template <class T> operator T() const; // no definition
operator float() const {return 0.f;}
};
template <class T>
T f(const X &x) {
// Resoved in error to X::operator float<float>() const`
// instead of correct `X::operator float() const
return x.operator T();
}
int main ()
{
return f<float>(X ());
}