magic_enum

[brief]

Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code

Stand With Ukraine

 __  __             _        ______                          _____
|  \/  |           (_)      |  ____|                        / ____|_     _
| \  / | __ _  __ _ _  ___  | |__   _ __  _   _ _ __ ___   | |   _| |_ _| |_
| |\/| |/ _` |/ _` | |/ __| |  __| | '_ \| | | | '_ ` _ \  | |  |_   _|_   _|
| |  | | (_| | (_| | | (__  | |____| | | | |_| | | | | | | | |____|_|   |_|
|_|  |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_|  \_____|
               __/ |
              |___/

Github releases Conan package Vcpkg package Build2 package Meson wrap License Try online Compiler explorer

Magic Enum C++

Header-only C++17 library provides static reflection for enums, work with any enum type without any macro or boilerplate code.

Documentation

Examples

Remarks

Integration

Compiler compatibility

Licensed under the MIT License

license MIT License
project magic_enum
doc-url github.com/Neargye/magic_enum/blob/master/doc/reference.md
src-url github.com/Neargye/magic_enum
topics Enumreflection
3 Versions
version 0.9.1
repository https://pkg.cppget.org/1/alpha
depends 0
requires 1; c++ >= 17
version 0.8.1
repository https://pkg.cppget.org/1/alpha
depends 0
requires 1; c++ >= 17
version 0.7.3+1
repository https://pkg.cppget.org/1/alpha
depends 0
requires 1; c++ >= 17