An empty enumeration is actually illegal according to C ++ 03:
7/3 Announcements:
In the simplest declaration, the optional init-declarator list can only be omitted when declaring a class (section 9) or listing (7.2), that is, when spec-specifier-seq contains either a class specifier, a specified type specifier with a class key (9.1), or an enumeration specifier . In these cases, and whenever a class specifier or an enumeration specifier is present in the description specifier-seq, the identifiers in these qualifiers refer to the names declared by the declaration (as class names, enumerated names or enumerations, depending on the syntax). In such cases, and with the exception of declaring an unnamed bit field (9.6), decl-specifier-seq enters one or more names into the program or should update the name entered by the previous declaration.
[Example: enum { }; // ill-formed typedef class { }; // ill-formed โend example]
So, I agree with MSN's answer to declare a simple enum , struct , or typedef declaration with a name that is clearly not going to conflict with anything (throw a GUID in there for a good measure). The best part about these things is that an ad can appear more than once, and until it becomes a problem.
source share