Y
Hacker News
new
|
ask
|
show
|
jobs
by
Aardwolf
722 days ago
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
1 comments
einpoklum
722 days ago
You can use `.name()` and that also works fine. Remember std::string is a heap-based thing.
link