From my understanding, appending ::
to the front of a namespace refers to the global namespace, regardless of any using statements or parent namespaces. If that is the case, and I haven't mis-understood anything, then why does such code compile (at least in Visual Studio):
namespace Foo {
namespace Bar {
class X;
}
}
using namespace Foo;
int main(void)
{
::Bar::X x;
}