struct Base { template <typename T, int = 42> void f(T &&) const {} }; struct Derived: Base { template <typename T, typename X = typename T::asdf> void f(T &&) const {} using Base::f; }; int main() { Derived const cd; cd.f('x'); } The following compiles fine with GCC and -std=c++11, but not with Clang. User liliscent over at https://stackoverflow.com/q/49235124/3919155 thinks this is a GCC bug, because Base::f should not be introduced by the using-declarator because of [namespace.udecl]: > When a using-declarator brings declarations from a > base class into a derived class, member functions > and member function templates in the derived class > override and/or hide member functions and member > function templates with the same name, parameter- > type-list, cv-qualification, and ref-qualifier (if > any) in a base class (rather than conflicting). > Such hidden or overridden declarations are excluded > from the set of declarations introduced by the > using-declarator.
EDG also accepts the code. I'm confirming this as an accepts-invalid bug, but it's possible this is a defect in the standard instead and GCC and EDG are doing the right thing.
Note GCC and ICC accept the code. While clang and MSVC reject the code.