In draft §7.3.1¶1 (n4527), the namespace definition grammar contains:
wired-namespace specifier:
identifier
encing-namespace-specifier :: identifier
This prevents namespace definitions by identifiers starting with '::'
namespace d{ namespace e {} }
namespace ::d::e
{
void foo(){}
}
Is there a reason for this limitation?
Update: The
bottom part (s) and some of the answers made it clear to me that I wrote "standard" when I meant "project" in the very first sentence. In my defense, I wrote the document number in parentheses. So let me emphasize that this is a question about the function of defining nested C ++ 1z namespaces.