A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/1021.html below:

CWG Issue 1021

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

2025-04-13

1021. Definitions of namespace membersSection: _N4868_.9.8.2.3  [namespace.memdef]     Status: CD4     Submitter: Michael Wong     Date: 2010-01-14

[Moved to DR at the November, 2014 meeting.]

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.

Proposed Resolution (July, 2014):

This issue is resolved by the resolution of issue 1838.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4