Key 10.3.4 / 2 "When searching for an unqualified name, names are displayed as if they were declared in the nearest spanning namespace, which contains both the directive and the assigned namespace."
The assigned namespace is A, the using directive is in B, and the smallest (in fact only) shared namespace is the global namespace. Thus, i appears as if declared in the global namespace and hides B::i .
source share