August 2012
Intermediate to advanced
976 pages
30h 17m
English
Under the new standard, we can forward declare an enum. An enum forward declaration must specify (implicitly or explicitly) the underlying size of the enum:
// forward declaration of unscoped enum named intValuesenum intValues : unsigned long long; // unscoped, must specify a typeenum class open_modes; // scoped enums can use int by default
Because there is no default size for an unscoped enum, every declaration must include the size of that enum. We can declare a scoped enum without specifying a size, in which case the size is implicitly defined as int.
As with any declaration, all the declarations and ...
Read now
Unlock full access