The key is 10.3.4/2 "During unqualified name lookup, the names appear as if they were declared in the nearest enclosing namespace which contains both the using-directive and the nominated namespace."
The nominated namespace is A, the using directive is in B, and the smallest (in fact only) common namespace is the global namespace. Thus i
appears as if declared in the global namespace, and is hidden by B::i
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…