6 Basics [basic]

6.5 Name lookup [basic.lookup]

6.5.5 Qualified name lookup [basic.lookup.qual] 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 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 name struct A::A a2; // object of type A — end example]
Lookups in which function names are ignored include names appearing in a nested-name-specifier, an elaborated-type-specifier, or a base-specifier.