Title
Hiding of function from using-declaration by signature
Status
c++14
Section
6.5.2 [class.member.lookup]
Submitter
Canada

Created on 2013-09-23.00:00:00 last changed 121 months ago

Messages

Date: 2014-02-15.00:00:00

[Moved to DR at the February, 2014 meeting.]

Date: 2013-09-15.00:00:00

Proposed resolution (September, 2013):

Change 6.5.2 [class.member.lookup] paragraph 3 as follows:

The lookup set for f in C, called S(f, C), consists of two component sets: the declaration set, a set of members named f; and the subobject set, a set of subobjects where declarations of these members (possibly including using-declarations) were found. In the declaration set, using-declarations are replaced by the members they designate set of designated members that are not hidden or overridden by members of the derived class (9.9 [namespace.udecl]), and type declarations (including injected-class-names) are replaced by the types they designate...
Date: 2013-09-23.00:00:00
N3690 comment CA 6

According to 9.9 [namespace.udecl] paragraph 15,

When a using-declaration brings names 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 (9.3.4.6 [dcl.fct]), cv-qualification, and ref-qualifier (if any) in a base class (rather than conflicting).

The algorithm for class-scope name lookup given in 6.5.2 [class.member.lookup], however, does not implement this requirement; there is nothing that removes a hidden base class member (replacing the using-declaration, per paragraph 3) from the result set.

History
Date User Action Args
2014-11-24 00:00:00adminsetstatus: dr -> c++14
2014-03-03 00:00:00adminsetmessages: + msg4955
2014-03-03 00:00:00adminsetstatus: ready -> dr
2013-10-14 00:00:00adminsetmessages: + msg4595
2013-09-23 00:00:00admincreate