Neargye/magic_enum
View on GitHub ↗ ★ 6,250 C++
Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code
7 mentions on Hacker News by 5 people: 5 stories, 2 comments · first 2019-04-08 · latest 2026-06-04
20082026
-
…I just updated the repo to add a parse_enum function for converting strings to enums as well. [1] https://github.com/Neargye/magic_enum/blob/master/doc/limita... [2] https://github.com/quicknir/wise_enum
comment by mehrdadn · 2022-07-27 · in Show HN: The Ultimate C++14 (and later) Enum Library -
There is also this approach - https://github.com/Neargye/magic_enum the trick (relyiong __FUNCTION__ like macros/(funcs?)) is here - https://github.com/Neargye/magic_enum/blob/master/include/ma... and https://github.com/Neargye/magic_enum/b…
comment by malkia · 2021-10-17 · in Circle: C++ Automation Language