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
-
▲ 5
Magic Enum C++: Header-only C++17 library provides static reflection for enumsstory by gjvc · 2026-06-04 · 0 comments
-
▲ 2
Usable Magic Enums for C++story by HaoZeke · 2023-07-04 · 0 comments
-
…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 -
▲ 2
Show HN: Enum to_string, from_string, iterating for modern C++, without macrostory by neargye · 2019-04-11 · 0 comments
-
▲ 4
Static reflection for enums (to string, from string, iteration) for modern C++story by neargye · 2019-04-11 · 0 comments
-
▲ 3
Show HN: Static reflection on enums for modern C++story by neargye · 2019-04-08 · 0 comments