If an elaborated-type-specifier is the sole constituent of a
declaration, the declaration is ill-formed unless it is an explicit
specialization ([temp.expl.spec]), an explicit
instantiation ([temp.explicit]) or it has one of the following
forms:
This rule also applies to
the form of elaborated-type-specifier that declares a
class-name or friend class since it can be construed
as referring to the definition of the class.