Enumerations

Enumerations definitions are written in CamelCase. Preferably, use scoped enumerations, below is an adapted example from the cppreference website.

Example

enum class Altitude: char
{ 
  HIGH='h',
  LOW='l', // C++11 allows the extra comma
}; 

The enumerators names are written in UPPERCASE.

Example

enum class Direction
{
  LEFT,
  RIGHT,
  UP,
  DOWN,
};