-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Full name of submitter: Brian Bi
Link to Mattermost thread: https://chat.isocpp.org/general/pl/3w7furqo4i8pfydse13d9tb4th
Issue description: A using-declarator that doesn't name a constructor should bind the unqualified-id in the scope where it appears. The note in [namespace.udecl]/2 suggests that the name is bound, but is not normative and doesn't specify the scope in which it's bound. Also, it is not clear whether there is actually a normative prohibition on something like using X::~X;
.
Suggested resolution: Edit the grammar for [namespace.udecl] as shown:
using-declarator:
typename
opt nested-name-specifierunqualified-idusing-declarator-idusing-declarator-id:
identifier
operator-function-id
conversion-function-id
literal-operator-id
In [namespace.udecl]/1, replace both occurrences of "unqualified-id" with "using-declarator-id".
Edit [namespace.udecl]/2:
If the using-declarator names a constructor, it declares that the class inherits the named set of constructor declarations from the nominated base class. Otherwise, the using-declarator introduces its using-declarator-id. [Note 1:
Otherwise, the unqualified-id in the using-declarator is bound toDuring name lookup, the using-declarator, whichis replacedduring name lookupwith the declarations it names ([basic.lookup]). If such a declaration is of an enumeration, the names of its enumerators are not bound. For the keywordtypename
, see [temp.res]. — end note]
Strike Note 2 at the beginning of [namespace.udecl]/4:
[Note 2: Since destructors do not have names, a using-declaration cannot refer to a destructor for a base class. — end note][...]
Strike [namespace.udecl]/5:
A using-declaration shall not name a template-id. [Example 3: ... ]