template <class T> class Hola { T a, b; public: Hola(const T a0, const T b0) : a(a0), b(b0) {} Hola<T> operator * (const T c) { return Hola<T>(a*c, b*c); } }; template <class T> Hola<T> adios(const T a, const T b) { Hola<T> h(a, b); return h*2; // 13.3 Overload resolution [over.match] // 13.3.2 Viable functions [over.match.viable] // 13.3.3.1 Implicit conversion sequences [over.best.ics] // 13.3.3.1.1 Standard conversion sequences [over.ics.scs] // 4.9 Floating-integral conversions [conv.fpint] } int main() { Hola<double> h = adios(1.0, 2.0); return 0; }