elaborated-type-specifier: class-key attribute-specifier-seq nested-name-specifier identifier class-key simple-template-id class-key nested-name-specifier template simple-template-id elaborated-enum-specifier
elaborated-enum-specifier: enum nested-name-specifier identifier
class-key attribute-specifier-seq identifier ; friend class-key :: identifier ; friend class-key :: simple-template-id ; friend class-key nested-name-specifier identifier ; friend class-key nested-name-specifier template simple-template-id ;
friend class T;is ill-formed.
enum class E { a, b }; enum E x = E::a; // OK struct S { } s; class S* p = &s; // OK— end example