Title
Visibility of entity named in class-scope using-declaration
Status
nad
Section
9.9 [namespace.udecl]
Submitter
Hubert Tong

Created on 2014-07-04.00:00:00 last changed 40 months ago

Messages

Date: 2020-11-15.00:00:00

Additional note (November, 2020):

The changes in P1787R6, adopted at the November, 2020 meeting, removes the quoted wording, affirming the rationale in a different manner.

Date: 2014-11-15.00:00:00

Rationale (November, 2014):

The rule was introduced because the hiding of a base class member by an intermediate derived class is potentially intentional and should not be capable of circumvention by a using-declaration in a derived class. The consensus of CWG preferred not to change the restriction.

Date: 2022-11-20.07:54:16

According to 9.9 [namespace.udecl] paragraph 17,

The base class members mentioned by a using-declaration shall be visible in the scope of at least one of the direct base classes of the class where the using-declaration is specified.

The rationale for this restriction is not clear and should be reconsidered.

History
Date User Action Args
2020-12-15 00:00:00adminsetmessages: + msg6300
2014-11-24 00:00:00adminsetmessages: + msg5280
2014-07-04 00:00:00admincreate