Initialize enum value when calling function
The list of enums in an enumeration declaration is defined as follows:
list-list is a comma-separated list of enumeration definitions, each of which is either just an identifier that becomes the name of the enumerator, or an identifier with an initializer: identifier = constexpr
You can only use constant expressions.
source to share