This means that the testing namespace referred to is a name from the global namespace, and not another nested namespace called testing .
Consider the following angular case, and probably an example of poor design:
namespace foo { struct gizmo{int n_;}; namespace bar { namespace foo { float f_; }; }; }; int main() { using namespace foo::bar; ::foo::gizmo g; g.n_; }
There are 2 namespaces named foo . One of them is the top level of the "global" namespace, and the other is inside foo::bar . then go to using namespace foo::bar , which means that any unqualified gizmo link will display the value in foo::bar::foo . If we really want this to be in foo , we can use an explicit qualification for this:
::foo::gizmo
John dibling
source share