I've read the following (3.4.3/1):
If a :: scope resolution operator in a nested-name-specifier is not preceded by a decltype-specifier, lookup of the name preceding that :: considers only namespaces, types, and templates whose specializations are types.
What is the lookup rule for nested-name-specifier?
For example:
#include <iostrem>
namespace A
{
int j=5;
}
int main()
{
std::cout << A::j //I assume that A will be searched as just *unqualified-name* appeared inside the function which is a member of namespace
}
The second example:
namespace A
{
namespace B
{
int j=5;
}
}
int main()
{
std::cout << A::B::j
}
Is it true that in the second example A::B will be looking as qualified name inside the namespace? I.e. we can define rules for nested-name-specifier lookup inductively. But I cant find anything like that in the standard. Is it true at all?