The region resolution operator :: used only as, well ... the region resolution operator.
In particular, the C ++ grammar, as indicated in the standard in ยง 5.1.1 / 8, is as follows:
qualified-id: nested-name-specifier template(opt) unqualified-id nested-name-specifier: :: type-name :: namespace-name :: decltype-specifier :: nested-name-specifier identifier :: nested-name-specifier templateopt simple-template-id ::
In your case, nested-name-specifier has the form namespace-name :: , in particular A :: . For a qualified-id you need at least unqualified-id .
An unqualified-id has the following grammar, according to ยง5.1.1:
unqualified-id: identifier operator-function-id conversion-function-id literal-operator-id ~ class-name ~ decltype-specifier template-id
source share