2.1 KiB
[class.qual]
6 Basics [basic]
6.5 Name lookup [basic.lookup]
6.5.5 Qualified name lookup [basic.lookup.qual]
6.5.5.2 Class members [class.qual]
In a lookup for a qualified name N whose lookup context is a class C in which function names are not ignored,18
if the search finds the injected-class-name of C ([class.pre]), or
if N is dependent and is the terminal name of a using-declarator ([namespace.udecl]) that names a constructor,
N is instead considered to name the constructor of class C.
Such a constructor name shall be used only in the declarator-id of a (friend) declaration of a constructor or in a using-declaration.
[Example 1: struct A { A(); };struct B: public A { B(); };
A::A() { } B::B() { } B::A ba; // object of type A A::A a; // error: A::A is not a type namestruct A::A a2; // object of type A â end example]
Lookups in which function names are ignored include names appearing in anested-name-specifier, anelaborated-type-specifier, or a base-specifier.