C/C++ Enum utility