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

2023-12-02


921. Unclear specification of inline namespaces

Section: 9.8.2  [namespace.def]     Status: CD2     Submitter: Michael Wong     Date: 19 June, 2009

[Voted into WP at October, 2009 meeting.]

According to 9.8.2 [namespace.def] paragraph 8,

Specifically, the inline namespace and its enclosing namespace are considered to be associated namespaces (6.5.4 [basic.lookup.argdep]) of one another, and a using-directive (9.8.4 [namespace.udir]) that names the inline namespace is implicitly inserted into the enclosing namespace.

There are two problems with this sentence. First, the concept of namespaces being associated with each other is undefined; 6.5.4 [basic.lookup.argdep] describes how namespaces are associated with types, not with other namespaces. Second, unlike unnamed namespaces, the location of the implicit using-directive is not specified.

Proposed resolution (July, 2009):

Change 9.8.2 [namespace.def] paragraph 8 as follows:

...Specifically, the inline namespace and its enclosing namespace are considered to be associated namespaces (6.5.4 [basic.lookup.argdep]) of one another both added to the set of associated namespaces used in argument-dependent lookup (6.5.4 [basic.lookup.argdep]) whenever one of them is, and a using-directive (9.8.4 [namespace.udir]) that names the inline namespace is implicitly inserted into the enclosing namespace as for an unnamed namespace (9.8.2.2 [namespace.unnamed]). Furthermore...