Namespaces | Classes | Typedefs | Functions | Variables
magic_enum Namespace Reference

Namespaces

 bitwise_operators
 
 customize
 
 detail
 

Classes

struct  is_scoped_enum
 
struct  is_unscoped_enum
 
struct  underlying_type
 

Typedefs

using char_type = string_view::value_type
 
template<typename T >
using Enum = detail::enum_concept< T >
 
template<auto V>
using enum_constant = detail::enum_constant< V >
 
template<typename T >
using underlying_type_t = typename underlying_type< T >::type
 

Functions

template<typename E , detail::enum_subtype S = detail::subtype_v<E>, typename BinaryPredicate = std::equal_to<>>
constexpr auto enum_cast (string_view value, [[maybe_unused]] BinaryPredicate p={}) noexcept(detail::is_nothrow_invocable< BinaryPredicate >()) -> detail::enable_if_t< E, optional< std::decay_t< E >>, BinaryPredicate >
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_cast (underlying_type_t< E > value) noexcept -> detail::enable_if_t< E, optional< std::decay_t< E >>>
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_contains (E value) noexcept -> detail::enable_if_t< E, bool >
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>, typename BinaryPredicate = std::equal_to<>>
constexpr auto enum_contains (string_view value, BinaryPredicate p={}) noexcept(detail::is_nothrow_invocable< BinaryPredicate >()) -> detail::enable_if_t< E, bool, BinaryPredicate >
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_contains (underlying_type_t< E > value) noexcept -> detail::enable_if_t< E, bool >
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_count () noexcept -> detail::enable_if_t< E, std::size_t >
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_entries () noexcept -> detail::enable_if_t< E, detail::entries_t< E, S >>
 
template<auto V, detail::enum_subtype S = detail::subtype_v<std::decay_t<decltype(V)>>>
constexpr auto enum_index () noexcept -> detail::enable_if_t< decltype(V), std::size_t >
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_index (E value) noexcept -> detail::enable_if_t< E, optional< std::size_t >>
 
template<typename E >
constexpr auto enum_integer (E value) noexcept -> detail::enable_if_t< E, underlying_type_t< E >>
 
template<auto V>
constexpr auto enum_name () noexcept -> detail::enable_if_t< decltype(V), string_view >
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_name (E value) noexcept -> detail::enable_if_t< E, string_view >
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_names () noexcept -> detail::enable_if_t< E, detail::names_t< E, S >>
 
template<typename E >
constexpr auto enum_type_name () noexcept -> detail::enable_if_t< E, string_view >
 
template<typename E >
constexpr auto enum_underlying (E value) noexcept -> detail::enable_if_t< E, underlying_type_t< E >>
 
template<typename E , std::size_t I, detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_value () noexcept -> detail::enable_if_t< E, std::decay_t< E >>
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_value (std::size_t index) noexcept -> detail::enable_if_t< E, std::decay_t< E >>
 
template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto enum_values () noexcept -> detail::enable_if_t< E, detail::values_t< E, S >>
 

Variables

template<bool AsFlags = true>
constexpr auto as_common = AsFlags ? detail::enum_subtype::common : detail::enum_subtype::flags
 
template<bool AsFlags = true>
constexpr auto as_flags = AsFlags ? detail::enum_subtype::flags : detail::enum_subtype::common
 
constexpr auto case_insensitive = detail::case_insensitive<>{}
 
constexpr bool is_magic_enum_supported = detail::supported<void>::value
 
template<typename T >
constexpr bool is_scoped_enum_v = is_scoped_enum<T>::value
 
template<typename T >
constexpr bool is_unscoped_enum_v = is_unscoped_enum<T>::value
 

Typedef Documentation

◆ char_type

using magic_enum::char_type = typedef string_view::value_type

Definition at line 145 of file magic_enum.hpp.

◆ Enum

template<typename T >
using magic_enum::Enum = typedef detail::enum_concept<T>

Definition at line 1129 of file magic_enum.hpp.

◆ enum_constant

template<auto V>
using magic_enum::enum_constant = typedef detail::enum_constant<V>

Definition at line 1156 of file magic_enum.hpp.

◆ underlying_type_t

template<typename T >
using magic_enum::underlying_type_t = typedef typename underlying_type<T>::type

Definition at line 1153 of file magic_enum.hpp.

Function Documentation

◆ enum_cast() [1/2]

template<typename E , detail::enum_subtype S = detail::subtype_v<E>, typename BinaryPredicate = std::equal_to<>>
constexpr auto magic_enum::enum_cast ( string_view  value,
[[maybe_unused] ] BinaryPredicate  p = {} 
) -> detail::enable_if_t<E, optional<std::decay_t<E>>, BinaryPredicate>
constexprnoexcept

Definition at line 1358 of file magic_enum.hpp.

◆ enum_cast() [2/2]

template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_cast ( underlying_type_t< E >  value) -> detail::enable_if_t<E, optional<std::decay_t<E>>>
constexprnoexcept

Definition at line 1329 of file magic_enum.hpp.

◆ enum_contains() [1/3]

template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_contains ( value) -> detail::enable_if_t<E, bool>
constexprnoexcept

Definition at line 1381 of file magic_enum.hpp.

◆ enum_contains() [2/3]

template<typename E , detail::enum_subtype S = detail::subtype_v<E>, typename BinaryPredicate = std::equal_to<>>
constexpr auto magic_enum::enum_contains ( string_view  value,
BinaryPredicate  p = {} 
) -> detail::enable_if_t<E, bool, BinaryPredicate>
constexprnoexcept

Definition at line 1407 of file magic_enum.hpp.

◆ enum_contains() [3/3]

template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_contains ( underlying_type_t< E >  value) -> detail::enable_if_t<E, bool>
constexprnoexcept

Definition at line 1399 of file magic_enum.hpp.

◆ enum_count()

template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_count ( ) -> detail::enable_if_t<E, std::size_t>
constexprnoexcept

Definition at line 1169 of file magic_enum.hpp.

◆ enum_entries()

template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_entries ( ) -> detail::enable_if_t<E, detail::entries_t<E, S>>
constexprnoexcept

Definition at line 1316 of file magic_enum.hpp.

◆ enum_index() [1/2]

template<auto V, detail::enum_subtype S = detail::subtype_v<std::decay_t<decltype(V)>>>
constexpr auto magic_enum::enum_index ( ) -> detail::enable_if_t<decltype(V), std::size_t>
constexprnoexcept

Definition at line 1263 of file magic_enum.hpp.

◆ enum_index() [2/2]

template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_index ( value) -> detail::enable_if_t<E, optional<std::size_t>>
constexprnoexcept

Definition at line 1223 of file magic_enum.hpp.

◆ enum_integer()

template<typename E >
constexpr auto magic_enum::enum_integer ( value) -> detail::enable_if_t<E, underlying_type_t<E>>
constexprnoexcept

Definition at line 1210 of file magic_enum.hpp.

◆ enum_name() [1/2]

template<auto V>
constexpr auto magic_enum::enum_name ( ) -> detail::enable_if_t<decltype(V), string_view>
constexprnoexcept

Definition at line 1275 of file magic_enum.hpp.

◆ enum_name() [2/2]

template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_name ( value) -> detail::enable_if_t<E, string_view>
constexprnoexcept

Definition at line 1285 of file magic_enum.hpp.

◆ enum_names()

template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_names ( ) -> detail::enable_if_t<E, detail::names_t<E, S>>
constexprnoexcept

Definition at line 1307 of file magic_enum.hpp.

◆ enum_type_name()

template<typename E >
constexpr auto magic_enum::enum_type_name ( ) -> detail::enable_if_t<E, string_view>
constexprnoexcept

Definition at line 1160 of file magic_enum.hpp.

◆ enum_underlying()

template<typename E >
constexpr auto magic_enum::enum_underlying ( value) -> detail::enable_if_t<E, underlying_type_t<E>>
constexprnoexcept

Definition at line 1216 of file magic_enum.hpp.

◆ enum_value() [1/2]

template<typename E , std::size_t I, detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_value ( ) -> detail::enable_if_t<E, std::decay_t<E>>
constexprnoexcept

Definition at line 1191 of file magic_enum.hpp.

◆ enum_value() [2/2]

template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_value ( std::size_t  index) -> detail::enable_if_t<E, std::decay_t<E>>
constexprnoexcept

Definition at line 1176 of file magic_enum.hpp.

◆ enum_values()

template<typename E , detail::enum_subtype S = detail::subtype_v<E>>
constexpr auto magic_enum::enum_values ( ) -> detail::enable_if_t<E, detail::values_t<E, S>>
constexprnoexcept

Definition at line 1201 of file magic_enum.hpp.

Variable Documentation

◆ as_common

template<bool AsFlags = true>
constexpr auto magic_enum::as_common = AsFlags ? detail::enum_subtype::common : detail::enum_subtype::flags
inlineconstexpr

Definition at line 1417 of file magic_enum.hpp.

◆ as_flags

template<bool AsFlags = true>
constexpr auto magic_enum::as_flags = AsFlags ? detail::enum_subtype::flags : detail::enum_subtype::common
inlineconstexpr

Definition at line 1414 of file magic_enum.hpp.

◆ case_insensitive

constexpr auto magic_enum::case_insensitive = detail::case_insensitive<>{}
inlineconstexpr

Definition at line 1324 of file magic_enum.hpp.

◆ is_magic_enum_supported

constexpr bool magic_enum::is_magic_enum_supported = detail::supported<void>::value
inlineconstexpr

Definition at line 1126 of file magic_enum.hpp.

◆ is_scoped_enum_v

template<typename T >
constexpr bool magic_enum::is_scoped_enum_v = is_scoped_enum<T>::value
inlineconstexpr

Definition at line 1145 of file magic_enum.hpp.

◆ is_unscoped_enum_v

template<typename T >
constexpr bool magic_enum::is_unscoped_enum_v = is_unscoped_enum<T>::value
inlineconstexpr

Definition at line 1137 of file magic_enum.hpp.



behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Dec 13 2024 03:19:19