The ::
scope resolution operator is only used as, well... scope resolution operator.
Specifically the C++ grammar, as specified by the standard at §5.1.1/8, is:
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
is in the form of namespace-name ::
, specifically A ::
. For a qualified-id
you need at least and unqualified-id
.
An unqualified-id
has the following grammar, as per §5.1.1:
unqualified-id:
identifier
operator-function-id
conversion-function-id
literal-operator-id
~ class-name
~ decltype-specifier template-id