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

2024-11-11


926. Inline unnamed namespaces

Section: 9.8.2.2  [namespace.unnamed]     Status: CD2     Submitter: Michael Wong     Date: 29 June, 2009

[Voted into WP at October, 2009 meeting.]

In 9.8.2 [namespace.def] paragraph 1, an unnamed-namespace-definition is defined as

However, there is no provision for the inline keyword in the expansion of unnamed namespaces in 9.8.2.2 [namespace.unnamed] paragraph 1. Strictly interpreted, that would mean that the inline qualifier is ignored for unnamed namespaces.

Proposed resolution (September, 2009):

Change 9.8.2.2 [namespace.unnamed] paragraph 1 as follows:

An unnamed-namespace-definition behaves as if it were replaced by

    inlineopt namespace unique { /* empty body */ }
    using namespace unique ;
    namespace unique { namespace-body }

where inline appears if and only if it appears in the unnamed-namespace-definition, all occurrences of unique in a translation unit are replaced by the same identifier, and this identifier differs from all other identifiers in the entire program.87 [Example:...