Created on 2010-01-14.00:00:00 last changed 94 months ago
[Moved to DR at the November, 2014 meeting.]
Proposed Resolution (July, 2014):
This issue is resolved by the resolution of issue 1838.
According to _N4868_.9.8.2.3 [namespace.memdef] paragraphs 1 and 2 read,
Members (including explicit specializations of templates (13.9.4 [temp.expl.spec])) of a namespace can be defined within that namespace.
Members of a named namespace can also be defined outside that namespace by explicit qualification (6.5.5.3 [namespace.qual]) of the name being defined, provided that the entity being defined was already declared in the namespace and the definition appears after the point of declaration in a namespace that encloses the declaration's namespace.
It is not clear what these specifications mean for the following pair of examples:
namespace N { struct A; } using N::A; struct A { };
Although this does not satisfy the “by explicit qualification” requirement, it is accepted by major implementations.
struct S; namespace A { using ::S; struct S { }; }
Is this a definition “within that namespace,” or should that wording be interpreted as “directly within” the namespace?
See also issue 1838.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-02-06 00:00:00 | admin | set | status: drwp -> cd4 |
2015-05-25 00:00:00 | admin | set | status: dr -> drwp |
2015-04-13 00:00:00 | admin | set | messages: + msg5369 |
2014-11-24 00:00:00 | admin | set | status: tentatively ready -> dr |
2014-10-13 00:00:00 | admin | set | messages: + msg5136 |
2014-10-13 00:00:00 | admin | set | status: drafting -> tentatively ready |
2014-03-03 00:00:00 | admin | set | status: open -> drafting |
2010-01-14 00:00:00 | admin | create |