This is the statement from the C++03 standard, §14.7.1p5:
If the overload resolution process can determine the correct function to call without instantiating a class template definition, it is unspecified whether that instantiation actually takes place. [Example:
template <class T> struct S { operator int(); }; void f(int); void f(S<int>&); void f(S<float>); void g(S<int>& sr) { f(sr); // instantiation of S<int> allowed but not required // instantiation of S<float> allowed but not required };
—end example]
I am unable to understand this point. Does it have undefined behavior?
I found another similar problem, which I also don't understand. There it is explained that the correct behavior is undefined, but what does that mean?