TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Rule:  POR#016

Synopsis:Do not assume that the size of an enumeration is the same for all platforms
Language:C++
Severity Level:5
Category:Portability


Description:

According to [Stroustrup] the size of an enumeration is the size of some integral type that can hold its range and not larger than the size of an int. For instance, if the size of an int is 4, the size of an enumeration can be 1, 2 or 4.