From http://eel.is/c++draft/class.member.lookup#1 :
A search in a scope
X
for a nameN
from a program point P is a single search inX
forN
fromP
unlessX
is the scope of a class or class templateT
, in which case the following steps define the result of the search.[Note 1: The result differs only if
N
is a conversion-function-id or if the single search would find nothing. — end note]
I'm having a hard time making a sense of the Note. It seems that a "single search" from a class scope will find preceding declarations at namespace scope, since the namespace scope contains the class scope. But, as we know, if the name has also been declared as a member of a non-dependent base class, then the base class member takes precedence over the namespace member. Note 1 seems to contradict this, since it's basically saying "if N
is not a conversion-function-id, then you can just do a normal single search, and only if you fail to find anything, then use the procedure in this section". But the single search will succeed by finding the namespace scope declaration, and the class member lookup will yield a different result.
Where is the error in my understanding?