Hacker News new | ask | show | jobs
by Koshkin 1420 days ago
One other thing that have felt the need to solve was iteration through the values as if it was a container, i.e. using the range-based for loop.
1 comments

That's supported here! You can do:

  for (auto const &member : enum_traits<E>::members())
  { std::cout << member.name() << std::endl; }