Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code. magic_enum does not pretend to be a silver bullet for reflection for enums, it was originally designed for small enum. If you are using vcpkg on your project for external dependencies, then you can use the magic-enum package. If you are using Conan to manage your dependencies, merely add magic_enum/x.y.z to your conan's requires, where x.y.z is the release version you want to use.

Features

  • Obtains enum value from string or integer
  • Returns enum value at specified index
  • Obtains integer value from enum value
  • Allows runtime enum value transformation to constexpr context
  • Improved UB-free "SFINAE-friendly"
  • Bitwise operators for enums

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow Magic Enum C++

Magic Enum C++ Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Magic Enum C++!

Additional Project Details

Operating Systems

Windows

Programming Language

C++

Related Categories

C++ Frameworks

Registered

2022-05-31