logoalt Hacker News

SuperV1234yesterday at 3:39 PM1 replyview on HN

C++:

  enum Color { red, green, blue };
  auto name = to_enum_string(Color::Red); // "Red"

Replies

shoolyyesterday at 4:56 PM

... and where does that `to_enum_string` come from exactly? It doesn't seem to be built-in, which is the point of the parent comment.

show 2 replies