This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Adopted at the February/March, 2017 meeting.]
There is implementation divergence on the status of the followingexample:
namespace A { namespace B { int x; } } namespace C { namespace B = A::B; } using namespace A; using namespace C; int x = B::x;This should presumably be valid: the lookup ofB findsA::B andC::B, but it is not ambiguous because theydenote the same entity. A similar example with ausing-declarationoralias-declaration seems to be universally accepted. Perhapsthe lookup rules need to be clarified regarding the status of thisexample.
Proposed resolution (November, 2016):
Change 6.5 [basic.lookup] paragraph 1 as follows:
The name lookup rules apply uniformly to all names(includingtypedef-names(9.2.4 [dcl.typedef]),namespace-names(9.9 [basic.namespace]), andclass-names(11.3 [class.name])) wherever the grammar allows such names in thecontext discussed by a particular rule. Name lookup associates the use ofa name with adeclarationset of declarations(6.2 [basic.def]) of that name.Name lookup shall find anunambiguous declaration for the name (see 6.5.2 [class.member.lookup]). Namelookup may associate more than one declaration with a name if it finds thename to be a function name;The declarations found by namelookup shall either all declare the same entity or shall all declarefunctions; in the latter case, the declarations are said to form aset of overloaded functions (_N4868_.12.2 [over.load]). Overloadresolution...