I would like to see an example of ignoring a function name in a nested qualifier name

Foot Note (33) on page 53 of N4140:

A search that ignores function names includes names that appear in the sub-name specifier, a specified type specifier, or a base specifier.

+4
source share
1 answer
namespace A
{
    void std();
    void foo()
    {
        std::cout << "Hello World"; // (1)
    }
};

In (1), stdit cannot name a function, therefore the function is A::stdignored during the search, but compiles the code .
This rule is explicitly mentioned in [basic.lookup.qual] / 1:

:: - decltype, , :: , , - .

class A : B {};

B , , B, .

class A a;

A .

+7

All Articles