On this site there is the following paragraph:
Out-of-namespace definitions and redeclarations are only allowed after the point of declaration, only at namespace scope, and only in namespaces that enclose the original namespace (including the global namespace) [and they must use qualified-id syntax (since C++14)]
I used [] to delimit the section that the (since C++14)
construct refers to.
My question is how were out-of-namespace definitions made before C++14, if they did not have to use qualified-id syntax
?
I looked at a C++11 standard draft and I found the following:
Members of a named namespace can also be defined outside that namespace by explicit qualification (3.4.3.2) of the name being defined, provided that the entity being defined was already declared in the namespace and the definition appears after the point of declaration in a namespace that encloses the declaration’s namespace. [...]
Is there a difference between qualified-id syntax
and explicit qualification
?
Thank you.