This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-12-19


1960. Visibility of entity named in class-scope using-declaration

Section: 9.9  [namespace.udecl]     Status: NAD     Submitter: Hubert Tong     Date: 2014-07-04

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.

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.

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.