Files
2025-10-25 03:02:53 +03:00

41 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[class.qual]
# 6 Basics [[basic]](./#basic)
## 6.5 Name lookup [[basic.lookup]](basic.lookup#class.qual)
### 6.5.5 Qualified name lookup [[basic.lookup.qual]](basic.lookup.qual#class.qual)
#### 6.5.5.2 Class members [class.qual]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/basic.tex#L2537)
In a lookup for a qualified name N whose lookup context is a class C in which function names are not ignored,[18](#footnote-18 "Lookups in which function names are ignored include names appearing in a nested-name-specifier, an elaborated-type-specifier, or a base-specifier.")
- [(1.1)](#1.1)
if the search finds the injected-class-name of C ([[class.pre]](class.pre "11.1Preamble")), or
- [(1.2)](#1.2)
if N is dependent and
is the terminal name of a [*using-declarator*](namespace.udecl#nt:using-declarator "9.10The using declaration[namespace.udecl]") ([[namespace.udecl]](namespace.udecl "9.10The using declaration"))
that names a constructor,
N is instead considered to name the constructor of class C[.](#1.sentence-1)
Such a constructor name shall be used only
in the [*declarator-id*](dcl.decl.general#nt:declarator-id "9.3.1General[dcl.decl.general]") of a (friend) declaration of a constructor or
in a [*using-declaration*](namespace.udecl#nt:using-declaration "9.10The using declaration[namespace.udecl]")[.](#1.sentence-2)
[*Example [1](#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*]
[18)](#footnote-18)[18)](#footnoteref-18)
Lookups in which
function names are ignored include names appearing in a[*nested-name-specifier*](expr.prim.id.qual#nt:nested-name-specifier "7.5.5.3Qualified names[expr.prim.id.qual]"), an[*elaborated-type-specifier*](dcl.type.elab#nt:elaborated-type-specifier "9.2.9.5Elaborated type specifiers[dcl.type.elab]"), or a [*base-specifier*](class.derived.general#nt:base-specifier "11.7.1General[class.derived.general]")[.](#footnote-18.sentence-1)