[
Note 2:
A conversion function in a derived class hides only
conversion functions in base classes that convert to the same type
. A conversion function template with a dependent return type hides only
templates in base classes that correspond to it (
[class.member.lookup]);
otherwise, it hides and is hidden as a non-template function
. Function overload resolution (
[over.match.best]) selects
the best conversion function to perform the conversion
. [
Example 5:
struct X {
operator int();
};
struct Y : X {
operator char();
};
void f(Y& a) {
if (a) {
}
}
—
end example]
—
end note]