Anonymous Namespace Ambiguity
Consider the following snippet: void Foo() // 1 { } namespace { void Foo() // 2 { } } int main() { Foo(); // Ambiguous. ::Foo(); // Calls the Foo in the global namespace (Foo #1). // I'm trying to call the `Foo` that's defined in the anonymous namespace (Foo #2). } How can I refer to something inside an anonymous namespace in this case? You can't. The standard contains the following section ( §7.3.1.1 , C++03): An unnamed-namespace-definition behaves as if it were replaced by namespace unique { /* empty body */ } using namespace unique; namespace unique { namespace-body } where all occurrences