magic_enum
C++ API reference for the namespace magic_enum.
Public API
Free Function: enum_flags_cast
Canonical path: magic_enum::enum_flags_cast
Declared in: include/magic_enum/magic_enum_flags.hpp
Signatures
[[nodiscard]] constexpr auto enum_flags_cast(string_view value, [[maybe_unused]] char_type sep = char_type{'|'}, [[maybe_unused]] BinaryPredicate p = {}) noexcept(detail::is_nothrow_invocable_v<BinaryPredicate>) -> detail::enable_if_t<E, optional<std::decay_t<E>>, BinaryPredicate>;
[[nodiscard]] constexpr auto enum_flags_cast(underlying_type_t<E> value) noexcept -> detail::enable_if_t<E, optional<std::decay_t<E>>>;
Free Function: enum_flags_contains
Canonical path: magic_enum::enum_flags_contains
Declared in: include/magic_enum/magic_enum_flags.hpp
Signatures
[[nodiscard]] constexpr auto enum_flags_contains(E value) noexcept -> detail::enable_if_t<E, bool>;
[[nodiscard]] constexpr auto enum_flags_contains(string_view value, char_type sep = char_type{'|'}, BinaryPredicate p = {}) noexcept(detail::is_nothrow_invocable_v<BinaryPredicate>) -> detail::enable_if_t<E, bool, BinaryPredicate>;
[[nodiscard]] constexpr auto enum_flags_contains(underlying_type_t<E> value) noexcept -> detail::enable_if_t<E, bool>;
Free Function: enum_flags_name
Canonical path: magic_enum::enum_flags_name
Declared in: include/magic_enum/magic_enum_flags.hpp
Signature
[[nodiscard]] auto enum_flags_name(E value, char_type sep = char_type{'|'}) -> detail::enable_if_t<E, string>;
Free Function: enum_flags_test
Canonical path: magic_enum::enum_flags_test
Declared in: include/magic_enum/magic_enum_flags.hpp
Signature
constexpr auto enum_flags_test(E flags, E flag) noexcept -> detail::enable_if_t<E, bool>;
Free Function: enum_flags_test_any
Canonical path: magic_enum::enum_flags_test_any
Declared in: include/magic_enum/magic_enum_flags.hpp
Signature
constexpr auto enum_flags_test_any(E lhs, E rhs) noexcept -> detail::enable_if_t<E, bool>;
Free Function: enum_for_each
Canonical path: magic_enum::enum_for_each
Declared in: include/magic_enum/magic_enum_utility.hpp
Signature
constexpr auto enum_for_each(F&& f);
Free Function: enum_fuse
Canonical path: magic_enum::enum_fuse
Declared in: include/magic_enum/magic_enum_fuse.hpp
Signature
[[nodiscard]] constexpr auto enum_fuse(Es... values) noexcept;
Free Function: enum_next_value
Canonical path: magic_enum::enum_next_value
Declared in: include/magic_enum/magic_enum_utility.hpp
Signature
[[nodiscard]] constexpr auto enum_next_value(E value, std::ptrdiff_t n = 1) noexcept -> detail::enable_if_t<E, optional<std::decay_t<E>>>;
Free Function: enum_next_value_circular
Canonical path: magic_enum::enum_next_value_circular
Declared in: include/magic_enum/magic_enum_utility.hpp
Signature
[[nodiscard]] constexpr auto enum_next_value_circular(E value, std::ptrdiff_t n = 1) noexcept -> detail::enable_if_t<E, std::decay_t<E>>;
Free Function: enum_prev_value
Canonical path: magic_enum::enum_prev_value
Declared in: include/magic_enum/magic_enum_utility.hpp
Signature
[[nodiscard]] constexpr auto enum_prev_value(E value, std::ptrdiff_t n = 1) noexcept -> detail::enable_if_t<E, optional<std::decay_t<E>>>;
Free Function: enum_prev_value_circular
Canonical path: magic_enum::enum_prev_value_circular
Declared in: include/magic_enum/magic_enum_utility.hpp
Signature
[[nodiscard]] constexpr auto enum_prev_value_circular(E value, std::ptrdiff_t n = 1) noexcept -> detail::enable_if_t<E, std::decay_t<E>>;
Free Function: enum_switch
Canonical path: magic_enum::enum_switch
Declared in: include/magic_enum/magic_enum_switch.hpp
Signatures
constexpr decltype(auto) enum_switch(F&& f, E value);
constexpr decltype(auto) enum_switch(F&& f, E value, Result&& result);