3.4.2/3 Let
X
be the lookup set produced by unqualified lookup (3.4.1) and letY
be the lookup set produced by argument dependent lookup (defined as follows). IfX
contains
- a declaration of a class member, or
- a block-scope function declaration that is not a using-declaration, or
- a declaration that is neither a function or a function template
then Y is empty. Otherwise...
So basically, ADL doesn't kick in when the ordinary lookup finds a member function or local (block-scope) function declaration (or something that's not a function). It does kick in when the ordinary lookup finds a stand-alone namespace-scope function, or when it finds nothing at all.