Is there a way to find the maximum and minimum defined values of an enum in c++?
enum My_enum { FIRST_VALUE = 0, MY_VALUE1, MY_VALUE2, ... MY_VALUEN, LAST_VALUE };
after definition, My_enum::LAST_VALUE== N+1