I think GCC is right, in §7.3.3/1, we can find:
The set of declarations introduced by the using-declaration is found by performing qualified name lookup (3.4.3, 10.2) for the name in the using-declaration, excluding functions that are hidden as described below.
I don't see any reason why operator T
would not be found, actually:
template<class T>
struct X: B {
T f () { return B::operator T; }
};
...compiles fine with g++ and clang (did not test on MSVC).
I cannot find anything in the standard specific to conversion functionsfor qualified name lookup except:
Since specializations of member templates for conversion functions are not found by name lookup, they are not considered when a using-declaration specifies a conversion function (14.5.2).
But B::operator int
is not a specialization of a member function template, so it should not be taken into account by the above.