[Bug c++/100443] member using declaration of function templates with different return types does not bring base class overload into derived class

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 6 09:59:23 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100443

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
C++11 7.3.3 [namespace.udecl] p15:

"When a using-declarator brings declarations from a base class into a derived
class scope, 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 (11.3.5), cv-qualification, and
ref-qualifier (if any) in a base class (rather than conflicting)."

C++14 7.3.3 [namespace.udecl] p15:

Same text.

C++17 10.3.3 [namespace.udecl] p15:

Same text minus the word "scope", and addition of "Such hidden or overridden
declarations are excluded from the set of declarations introduced by the
using-declarator."

C++20 9.9 [namespace.udecl] p15:

Same text with the addition of "trailing requires-clause (if any),"


So I don't see where you're finding anything about signatures in p11. The rule
is based on name, parameter-type-list, cv-qualification, and ref-qualifier. It
doesn't depend on return type. It is the same for member functions and member
function templates.


More information about the Gcc-bugs mailing list