c++ - Trying to understand [class.qual]/2 in the C++14 Standard -


[class.qual]/2:

in lookup in function names not ignored33 , nested-name-specifier nominates class c:

  1. if name specified after nested-name-specifier, when looked in c, injected-class-name of c (clause 9), or
  2. in using-declaration (7.3.3) member-declaration, if name specified after nested-namespecifier same identifier or simple-template-id’s template-name in last component of nested-name-specifier,

the name instead considered name constructor of class c. [ note: example, constructor not acceptable lookup result in elaborated-type-specifier constructor not used in place of injected-class-name. —end note ] such constructor name shall used in declarator-id of declaration names constructor or in using-declaration.

(33) lookups in function names ignored include names appearing in nested-name-specifier, elaborated-type-specifier, or base-specifier.

if consider example below

struct { a(); }; struct b: public { b(); }; a::a() { } 

is correct that:

  • the lookup first a in a::a() {} ignores function names because a belongs nested-name-specifier?
  • the lookup second a in a::a() {} doesn't ignore function names because a doesn't belong nested-name-specifier, nor elaborated-type-specifier, nor base-specifier?


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -