can somebody explain me the difference between the following namespace usages:
using namespace ::layer::module;
and
using namespa
It is called as Qualified name lookup in C++.
It means that the layer namespace being referred to is the one off the global namespace, rather than another nested namespace named layer.
For Standerdese fans:
$3.4.3/1
"The name of a class or namespace member can be referred to after the :: scope resolution operator (5.1) applied to a nested-name-specifier that nominates its class or namespace. During the lookup for a name preceding the :: scope resolution operator, object, function, and enumerator names are ignored. If the name found is not a class-name (clause 9) or namespace-name (7.3.1), the program is ill-formed."