The vast majority of C++ users think that the using-directive is injecting names into the scope where it’s declared. ... In reality, the names are injected into the nearest common ancestor of the target namespace (::testing) and the usage namespace (::totw::example::anomymous). In our example, that’s the global namespace!
The vast majority of C++ users think that the using-directive is injecting names into the scope where it’s declared. ... In reality, the names are injected into the nearest common ancestor of the target namespace (::testing) and the usage namespace (::totw::example::anomymous). In our example, that’s the global namespace!