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:
Any unqualified lookup for the identifier (in the first case)
does not consider scopes that contain
the nearest enclosing namespace or block scope; no name is bound.
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.