Title
Name lookup in parameters
Status
nad
Section
6.5.3 [basic.lookup.unqual]
Submitter
Alan Nash

Created on 2000-01-06.00:00:00 last changed 39 months ago

Messages

Date: 2021-02-15.00:00:00

Rationale (February, 2021):

This issue was resolved by the resolution of issue 1352.

Date: 2022-11-20.07:54:16

Additional note, January, 2012:

brace-or-equal-initializers for non-static data members are intended effectively as syntactic sugar for mem-initializers in constructor definitions; the lookup should be the same.

Date: 2004-09-10.00:00:00

The description of name lookup in the parameter-declaration-clause of member functions in 6.5.3 [basic.lookup.unqual] paragraphs 7-8 is flawed in at least two regards.

First, both paragraphs 7 and 8 apply to the parameter-declaration-clause of a member function definition and give different rules for the lookup. Paragraph 7 applies to names "used in the definition of a class X outside of a member function body...," which includes the parameter-declaration-clause of a member function definition, while paragraph 8 applies to names following the function's declarator-id (see the proposed resolution of issue 41), including the parameter-declaration-clause.

Second, paragraph 8 appears to apply to the type names used in the parameter-declaration-clause of a member function defined inside the class definition. That is, it appears to allow the following code, which was not the intent of the Committee:

    struct S {
        void f(I i) { }
        typedef int I;
    };
History
Date User Action Args
2021-02-17 00:00:00adminsetmessages: + msg6501
2021-02-17 00:00:00adminsetstatus: drafting -> nad
2012-01-17 00:00:00adminsetmessages: + msg3605
2012-01-17 00:00:00adminsetstatus: open -> drafting
2000-01-06 00:00:00admincreate