In C and C++, enumeration types map to integers. The normal expectation is that each enumeration type member is distinct.

Non-Compliant Code Example

However, if required, members can be assigned explicit values, as in:

enum {red=4, orange, yellow, green, blue, indigo=6, violet};

It may not be obvious to the programmer (though it is fully specified in the language) that yellow and indigo have been declared to be identical values (6), as are green and violet (7).

Compliant Solution

Enumeration type declarations must either

enum {red, orange, yellow, green, blue, indigo, violet};
enum {red=4, orange, yellow, green, blue, indigo, violet};
enum {red=4, orange=5, yellow=1, green=5, blue=2, indigo=3, violet=7};

References