
magic_enum
Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code.
Overview & architecture
- Categories
- Core Libraries / Utility & Foundation Librariesprimary
- C++ standard
- C++17
- Build systems
- –
- License
- MIT
- Languages
- C++
- Last release
- v0.9.8 · May 3, 2026
Links
- Repositorygithub.com/Neargye/magic_enum
Repository activity
Recent notable activity
- Releasemagic_enum v0.9.8
Release v0.9.8 Add ADL way of defining enum_range ( Add prefix trimming (#414) Add support fmt and std::format in C++20 module (#394) Add rules_cc bazel dependency (#438) Add custom separator symbol for enum_flags_cast from string ( Fix empty string and static_str string_view conversion ( Fix CWG1766 ( Fix std::format…
Neargyev0.9.8 - Releasemagic_enum v0.9.7
Release v0.9.7 [breaking changes] Need to use #include instead of #include Fix installing via CMake (#374) Fix install headers and pkg-config file via Meson (#383) Fix bitset constructor (#367) Fix parameterize formatter::format (#365) Fix enum_fuse shift value calculation (#386) (#387)
Neargyev0.9.7 - Releasemagic_enum v0.9.6
Release v0.9.6 Support C++20 module. ( ( Сhecking that the enum is valid (not empty and not forward declaration) ( ( Add enum_reflected ( Add support for overriding MAGIC_ENUM_ASSERT ( Add better support for Yocto/PetaLinux ( Fix -wshadow (
Neargyev0.9.6 - Release
- Releasemagic_enum v0.9.4
Release v0.9.4 Put headers in include/magic_enum directory Minor fixes and improvements
Neargyev0.9.4 - Releasemagic_enum v0.9.3
Release v0.9.3 [hotfix] Fix enum type name in namespace/class ( Add enum_next_value and enum_prev_value in ( Move enum_for_each to Add Add option MAGIC_ENUM_NO_ASSERT Add option MAGIC_ENUM_NO_EXCEPTION Add option MAGIC_ENUM_ENABLE_HASH_SWITCH Fix error with _ITERATOR_DEBUG_LEVEL on msvc
Neargyev0.9.3 - Releasemagic_enum v0.9.2
Release v0.9.2 [hotfix] Fix missing enum name in an anonymous namespace on Clang ( [hotfix] Re-Fix compiling on >= Clang-16 ( [hotfix] Fix missing enum name on Visual Studio 2017 ( Add enum_flags_test and enum_flags_test_any functions for flags Move all enum_flags_* to
Neargyev0.9.2 - Releasemagic_enum v0.9.1
Release v0.9.1 [hotfix] fix enum name in namespace/class ( enable wchar_t as string_view value_type (
Neargyev0.9.1 - Releasemagic_enum v0.9.0
Release v0.9.0 [breaking changes] Remove auto detect enum_range::is_flags. Need to explicitly set enum_range::is_flags, or add define MAGIC_ENUM_AUTO_IS_FLAGS for old behavior. Move iostream_operators to magic_enum_iostream.hpp Remove MAGIC_ENUM_ENABLE_NONASCII. Now it works by default. Add support big range in…
Neargyev0.9.0 - Releasemagic_enum v0.8.2
Release v0.8.2 Compile-time optimization ( Add option MAGIC_ENUM_ENABLE_HASH to generate a hash switch, this need more memory and compile-time but functions like 'enum_name', 'enum_switch', etc will have O(1) complexity Add a separate header for enum_switch Add support no default value enum_switch ( Fix build…
Neargyev0.8.2
Maintainers & organizations
Maintainers
Top contributors
617 commitssource: github.com ↗✓ verified
12 commitssource: github.com ↗✓ verified
6 commitssource: github.com ↗✓ verified
5 commitssource: github.com ↗✓ verified
5 commitssource: github.com ↗✓ verified
4 commitssource: github.com ↗✓ verified
4 commitssource: github.com ↗✓ verified
3 commitssource: github.com ↗✓ verified
2 commitssource: github.com ↗✓ verified
2 commitssource: github.com ↗✓ verified
2 commitssource: github.com ↗✓ verified
2 commitssource: github.com ↗✓ verified
2 commitssource: github.com ↗✓ verified
2 commitssource: github.com ↗✓ verified
2 commitssource: github.com ↗✓ verified
Releases & changelog
- magic_enum v0.9.8May 3, 2026
Release v0.9.8 Add ADL way of defining enum_range ( Add prefix trimming (#414) Add support fmt and std::format in C++20 module (#394) Add rules_cc bazel dependency (#438) Add custom separator symbol for enum_flags_cast from string ( Fix empty string and static_str string_view conversion ( Fix CWG1766 ( Fix std::format…
- magic_enum v0.9.7Nov 13, 2024
Release v0.9.7 [breaking changes] Need to use #include instead of #include Fix installing via CMake (#374) Fix install headers and pkg-config file via Meson (#383) Fix bitset constructor (#367) Fix parameterize formatter::format (#365) Fix enum_fuse shift value calculation (#386) (#387)
- magic_enum v0.9.6Aug 13, 2024
Release v0.9.6 Support C++20 module. ( ( Сhecking that the enum is valid (not empty and not forward declaration) ( ( Add enum_reflected ( Add support for overriding MAGIC_ENUM_ASSERT ( Add better support for Yocto/PetaLinux ( Fix -wshadow (
- magic_enum v0.9.5Nov 16, 2023
Release v0.9.5 [hotfix] Fix bazel ( ( ( ( Fix UB (
- magic_enum v0.9.4Nov 12, 2023
Release v0.9.4 Put headers in include/magic_enum directory Minor fixes and improvements
- magic_enum v0.9.3Jun 22, 2023
Release v0.9.3 [hotfix] Fix enum type name in namespace/class ( Add enum_next_value and enum_prev_value in ( Move enum_for_each to Add Add option MAGIC_ENUM_NO_ASSERT Add option MAGIC_ENUM_NO_EXCEPTION Add option MAGIC_ENUM_ENABLE_HASH_SWITCH Fix error with _ITERATOR_DEBUG_LEVEL on msvc
- magic_enum v0.9.2Jun 10, 2023
Release v0.9.2 [hotfix] Fix missing enum name in an anonymous namespace on Clang ( [hotfix] Re-Fix compiling on >= Clang-16 ( [hotfix] Fix missing enum name on Visual Studio 2017 ( Add enum_flags_test and enum_flags_test_any functions for flags Move all enum_flags_* to
- magic_enum v0.9.1May 31, 2023
Release v0.9.1 [hotfix] fix enum name in namespace/class ( enable wchar_t as string_view value_type (
- magic_enum v0.9.0majorMay 24, 2023
Release v0.9.0 [breaking changes] Remove auto detect enum_range::is_flags. Need to explicitly set enum_range::is_flags, or add define MAGIC_ENUM_AUTO_IS_FLAGS for old behavior. Move iostream_operators to magic_enum_iostream.hpp Remove MAGIC_ENUM_ENABLE_NONASCII. Now it works by default. Add support big range in…
- magic_enum v0.8.2Dec 9, 2022
Release v0.8.2 Compile-time optimization ( Add option MAGIC_ENUM_ENABLE_HASH to generate a hash switch, this need more memory and compile-time but functions like 'enum_name', 'enum_switch', etc will have O(1) complexity Add a separate header for enum_switch Add support no default value enum_switch ( Fix build…
Contribution opportunities
No published opportunities
Why this score
- Activity0.733 merged PRs in 30 days (full marks at 20); 72 commits in 30 days (full marks at 60) [health score: no data for backlog pressure; weights renormalized]health
- Onboarding0.25has CI; missing contributing guide, mainstream build (CMake/Bazel/Meson), docs site [contrib score: no data for entry points; weights renormalized]contrib
- Maintainer responsiveness1.00median PR merge time 14 h (full marks within 72 h, zero after 60 days) [health score: no data for backlog pressure; weights renormalized] [contrib score: no data for entry points; weights renormalized]healthcontrib
- Release cadence0.54last release 203 days ago (full marks within 90, zero after 730); 1 releases in 365 days (full marks at 4) [health score: no data for backlog pressure; weights renormalized]health
- Contributor breadth0.374 unique contributors in 90 days (full marks at 25); top contributor has 92% of commits; stars count for at most 5% of this signal [health score: no data for backlog pressure; weights renormalized]health
Each signal is normalized to 0–1 with fixed thresholds; scores are weighted sums × 100. Stars are not an input.