Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ouch, I first thought this was the example of how to do these things _before_ reflection is introduced to C++

The for loop required to do enum to string really makes it



You can use `.name()` and that also works fine. Remember std::string is a heap-based thing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: