Classes | Typedefs | Enumerations | Functions | Variables
magic_enum::detail Namespace Reference

Classes

class  case_insensitive
 
struct  enable_if_enum
 
struct  enable_if_enum< true, R >
 
struct  has_is_flags
 
struct  has_is_flags< T, std::void_t< decltype(customize::enum_range< T >::is_flags)> >
 
struct  is_reflected
 
struct  is_scoped_enum
 
struct  is_scoped_enum< T, true >
 
struct  is_unscoped_enum
 
struct  is_unscoped_enum< T, true >
 
struct  range_max
 
struct  range_max< T, std::void_t< decltype(customize::enum_range< T >::max)> >
 
struct  range_min
 
struct  range_min< T, std::void_t< decltype(customize::enum_range< T >::min)> >
 
class  static_str
 
class  static_str< 0 >
 
struct  str_view
 
struct  supported
 
struct  underlying_type
 
struct  underlying_type< T, true >
 
struct  valid_count_t
 

Typedefs

template<typename T , typename R , typename BinaryPredicate = std::equal_to<>, typename D = std::decay_t<T>>
using enable_if_t = typename enable_if_enum< std::is_enum_v< D > &&std::is_invocable_r_v< bool, BinaryPredicate, char_type, char_type >, R >::type
 
template<typename E , enum_subtype S, typename D = std::decay_t<E>>
using entries_t = decltype((entries_v< D, S >))
 
template<typename T , std::enable_if_t< std::is_enum_v< std::decay_t< T >>, int > = 0>
using enum_concept = T
 
template<auto V, typename E = std::decay_t<decltype(V)>, std::enable_if_t< std::is_enum_v< E >, int > = 0>
using enum_constant = std::integral_constant< E, V >
 
template<typename E , enum_subtype S, typename D = std::decay_t<E>>
using names_t = decltype((names_v< D, S >))
 
template<typename E , enum_subtype S, typename D = std::decay_t<E>>
using values_t = decltype((values_v< D, S >))
 

Enumerations

enum  enum_subtype { enum_subtype::common, enum_subtype::flags }
 

Functions

template<typename BinaryPredicate >
constexpr bool cmp_equal (string_view lhs, string_view rhs, [[maybe_unused]] BinaryPredicate &&p) noexcept(is_nothrow_invocable< BinaryPredicate >())
 
template<typename L , typename R >
constexpr bool cmp_less (L lhs, R rhs) noexcept
 
template<typename E , enum_subtype S, std::size_t... I>
constexpr auto entries (std::index_sequence< I... >) noexcept
 
template<typename E , E V>
constexpr auto enum_name () noexcept
 
constexpr std::size_t find (string_view str, char_type c) noexcept
 
template<typename BinaryPredicate >
constexpr bool is_default_predicate () noexcept
 
template<typename BinaryPredicate >
constexpr bool is_nothrow_invocable ()
 
template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr bool is_sparse () noexcept
 
template<typename E , auto V>
constexpr bool is_valid () noexcept
 
template<typename I >
constexpr I log2 (I value) noexcept
 
template<typename E >
constexpr auto n () noexcept
 
template<typename E , enum_subtype S, std::size_t... I>
constexpr auto names (std::index_sequence< I... >) noexcept
 
template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr int reflected_max () noexcept
 
template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr int reflected_min () noexcept
 
template<typename T >
constexpr enum_subtype subtype (std::false_type) noexcept
 
template<typename E , typename U = std::underlying_type_t<E>>
constexpr enum_subtype subtype (std::true_type) noexcept
 
template<typename T , std::size_t N, std::size_t... I>
constexpr std::array< std::remove_cv_t< T >, N > to_array (T(&a)[N], std::index_sequence< I... >) noexcept
 
template<typename E >
constexpr auto type_name () noexcept
 
template<typename E , int O, enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr U ualue (std::size_t i) noexcept
 
template<typename E , enum_subtype S, std::size_t Size, int Min>
constexpr auto valid_count () noexcept
 
template<typename E , enum_subtype S, std::size_t Size, int Min, std::size_t I>
constexpr void valid_count (bool *valid, std::size_t &count) noexcept
 
template<typename E , int O, enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr E value (std::size_t i) noexcept
 
template<typename E , enum_subtype S, std::size_t Size, int Min>
constexpr auto values () noexcept
 
template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr auto values () noexcept
 

Variables

template<typename... T>
constexpr bool always_false_v = false
 
template<typename E , enum_subtype S>
constexpr auto count_v = values_v<E, S>.size()
 
template<typename E , enum_subtype S>
constexpr auto entries_v = entries<E, S>(std::make_index_sequence<count_v<E, S>>{})
 
template<typename E , E V>
constexpr auto enum_name_v = enum_name<E, V>()
 
template<typename T >
constexpr bool is_enum_v = std::is_enum_v<T> && std::is_same_v<T, std::decay_t<T>>
 
template<typename E , enum_subtype S>
constexpr bool is_reflected_v = is_reflected<std::decay_t<E>, S>{}
 
template<typename E , enum_subtype S = subtype_v<E>>
constexpr bool is_sparse_v = is_sparse<E, S>()
 
template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr auto max_v = (count_v<E, S> > 0) ? static_cast<U>(values_v<E, S>.back()) : U{0}
 
template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr auto min_v = (count_v<E, S> > 0) ? static_cast<U>(values_v<E, S>.front()) : U{0}
 
template<typename E , enum_subtype S>
constexpr auto names_v = names<E, S>(std::make_index_sequence<count_v<E, S>>{})
 
template<typename E , typename D = std::decay_t<E>>
constexpr auto subtype_v = subtype<D>(std::is_enum<D>{})
 
template<typename E >
constexpr auto type_name_v = type_name<E>()
 
template<typename E , enum_subtype S>
constexpr auto values_v = values<E, S>()
 

Typedef Documentation

◆ enable_if_t

template<typename T , typename R , typename BinaryPredicate = std::equal_to<>, typename D = std::decay_t<T>>
using magic_enum::detail::enable_if_t = typedef typename enable_if_enum<std::is_enum_v<D> && std::is_invocable_r_v<bool, BinaryPredicate, char_type, char_type>, R>::type

Definition at line 889 of file magic_enum.hpp.

◆ entries_t

template<typename E , enum_subtype S, typename D = std::decay_t<E>>
using magic_enum::detail::entries_t = typedef decltype((entries_v<D, S>))

Definition at line 848 of file magic_enum.hpp.

◆ enum_concept

template<typename T , std::enable_if_t< std::is_enum_v< std::decay_t< T >>, int > = 0>
using magic_enum::detail::enum_concept = typedef T

Definition at line 892 of file magic_enum.hpp.

◆ enum_constant

template<auto V, typename E = std::decay_t<decltype(V)>, std::enable_if_t< std::is_enum_v< E >, int > = 0>
using magic_enum::detail::enum_constant = typedef std::integral_constant<E, V>

Definition at line 224 of file magic_enum.hpp.

◆ names_t

template<typename E , enum_subtype S, typename D = std::decay_t<E>>
using magic_enum::detail::names_t = typedef decltype((names_v<D, S>))

Definition at line 836 of file magic_enum.hpp.

◆ values_t

template<typename E , enum_subtype S, typename D = std::decay_t<E>>
using magic_enum::detail::values_t = typedef decltype((values_v<D, S>))

Definition at line 815 of file magic_enum.hpp.

Enumeration Type Documentation

◆ enum_subtype

Enumerator
common 
flags 

Definition at line 645 of file magic_enum.hpp.

Function Documentation

◆ cmp_equal()

template<typename BinaryPredicate >
constexpr bool magic_enum::detail::cmp_equal ( string_view  lhs,
string_view  rhs,
[[maybe_unused] ] BinaryPredicate &&  p 
)
constexprnoexcept

Definition at line 343 of file magic_enum.hpp.

◆ cmp_less()

template<typename L , typename R >
constexpr bool magic_enum::detail::cmp_less ( lhs,
rhs 
)
constexprnoexcept

Definition at line 371 of file magic_enum.hpp.

◆ entries()

template<typename E , enum_subtype S, std::size_t... I>
constexpr auto magic_enum::detail::entries ( std::index_sequence< I... >  )
constexprnoexcept

Definition at line 839 of file magic_enum.hpp.

◆ enum_name()

template<typename E , E V>
constexpr auto magic_enum::detail::enum_name ( )
constexprnoexcept

Definition at line 596 of file magic_enum.hpp.

◆ find()

constexpr std::size_t magic_enum::detail::find ( string_view  str,
char_type  c 
)
constexprnoexcept

Definition at line 308 of file magic_enum.hpp.

◆ is_default_predicate()

template<typename BinaryPredicate >
constexpr bool magic_enum::detail::is_default_predicate ( )
constexprnoexcept

Definition at line 331 of file magic_enum.hpp.

◆ is_nothrow_invocable()

template<typename BinaryPredicate >
constexpr bool magic_enum::detail::is_nothrow_invocable ( )
constexpr

Definition at line 337 of file magic_enum.hpp.

◆ is_sparse()

template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr bool magic_enum::detail::is_sparse ( )
constexprnoexcept

Definition at line 851 of file magic_enum.hpp.

◆ is_valid()

template<typename E , auto V>
constexpr bool magic_enum::detail::is_valid ( )
constexprnoexcept

Definition at line 621 of file magic_enum.hpp.

◆ log2()

template<typename I >
constexpr I magic_enum::detail::log2 ( value)
constexprnoexcept

Definition at line 391 of file magic_enum.hpp.

◆ n()

template<typename E >
constexpr auto magic_enum::detail::n ( )
constexprnoexcept

Definition at line 417 of file magic_enum.hpp.

◆ names()

template<typename E , enum_subtype S, std::size_t... I>
constexpr auto magic_enum::detail::names ( std::index_sequence< I... >  )
constexprnoexcept

Definition at line 827 of file magic_enum.hpp.

◆ reflected_max()

template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr int magic_enum::detail::reflected_max ( )
constexprnoexcept

Definition at line 685 of file magic_enum.hpp.

◆ reflected_min()

template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr int magic_enum::detail::reflected_min ( )
constexprnoexcept

Definition at line 669 of file magic_enum.hpp.

◆ subtype() [1/2]

template<typename T >
constexpr enum_subtype magic_enum::detail::subtype ( std::false_type  )
constexprnoexcept

Definition at line 803 of file magic_enum.hpp.

◆ subtype() [2/2]

template<typename E , typename U = std::underlying_type_t<E>>
constexpr enum_subtype magic_enum::detail::subtype ( std::true_type  )
constexprnoexcept

Definition at line 777 of file magic_enum.hpp.

◆ to_array()

template<typename T , std::size_t N, std::size_t... I>
constexpr std::array<std::remove_cv_t<T>, N> magic_enum::detail::to_array ( T(&)  a[N],
std::index_sequence< I... >   
)
constexprnoexcept

Definition at line 408 of file magic_enum.hpp.

◆ type_name()

template<typename E >
constexpr auto magic_enum::detail::type_name ( )
constexprnoexcept

Definition at line 472 of file magic_enum.hpp.

◆ ualue()

template<typename E , int O, enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr U magic_enum::detail::ualue ( std::size_t  i)
constexprnoexcept

Definition at line 651 of file magic_enum.hpp.

◆ valid_count() [1/2]

template<typename E , enum_subtype S, std::size_t Size, int Min>
constexpr auto magic_enum::detail::valid_count ( )
constexprnoexcept

Definition at line 735 of file magic_enum.hpp.

◆ valid_count() [2/2]

template<typename E , enum_subtype S, std::size_t Size, int Min, std::size_t I>
constexpr void magic_enum::detail::valid_count ( bool *  valid,
std::size_t &  count 
)
constexprnoexcept

Definition at line 711 of file magic_enum.hpp.

◆ value()

template<typename E , int O, enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr E magic_enum::detail::value ( std::size_t  i)
constexprnoexcept

Definition at line 664 of file magic_enum.hpp.

◆ values() [1/2]

template<typename E , enum_subtype S, std::size_t Size, int Min>
constexpr auto magic_enum::detail::values ( )
constexprnoexcept

Definition at line 742 of file magic_enum.hpp.

◆ values() [2/2]

template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr auto magic_enum::detail::values ( )
constexprnoexcept

Definition at line 767 of file magic_enum.hpp.

Variable Documentation

◆ always_false_v

template<typename... T>
constexpr bool magic_enum::detail::always_false_v = false
inlineconstexpr

Definition at line 227 of file magic_enum.hpp.

◆ count_v

template<typename E , enum_subtype S>
constexpr auto magic_enum::detail::count_v = values_v<E, S>.size()
inlineconstexpr

Definition at line 818 of file magic_enum.hpp.

◆ entries_v

template<typename E , enum_subtype S>
constexpr auto magic_enum::detail::entries_v = entries<E, S>(std::make_index_sequence<count_v<E, S>>{})
inlineconstexpr

Definition at line 845 of file magic_enum.hpp.

◆ enum_name_v

template<typename E , E V>
constexpr auto magic_enum::detail::enum_name_v = enum_name<E, V>()
inlineconstexpr

Definition at line 618 of file magic_enum.hpp.

◆ is_enum_v

template<typename T >
constexpr bool magic_enum::detail::is_enum_v = std::is_enum_v<T> && std::is_same_v<T, std::decay_t<T>>
inlineconstexpr

Definition at line 414 of file magic_enum.hpp.

◆ is_reflected_v

template<typename E , enum_subtype S>
constexpr bool magic_enum::detail::is_reflected_v = is_reflected<std::decay_t<E>, S>{}
inlineconstexpr

Definition at line 877 of file magic_enum.hpp.

◆ is_sparse_v

template<typename E , enum_subtype S = subtype_v<E>>
constexpr bool magic_enum::detail::is_sparse_v = is_sparse<E, S>()
inlineconstexpr

Definition at line 866 of file magic_enum.hpp.

◆ max_v

template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr auto magic_enum::detail::max_v = (count_v<E, S> > 0) ? static_cast<U>(values_v<E, S>.back()) : U{0}
inlineconstexpr

Definition at line 824 of file magic_enum.hpp.

◆ min_v

template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>>
constexpr auto magic_enum::detail::min_v = (count_v<E, S> > 0) ? static_cast<U>(values_v<E, S>.front()) : U{0}
inlineconstexpr

Definition at line 821 of file magic_enum.hpp.

◆ names_v

template<typename E , enum_subtype S>
constexpr auto magic_enum::detail::names_v = names<E, S>(std::make_index_sequence<count_v<E, S>>{})
inlineconstexpr

Definition at line 833 of file magic_enum.hpp.

◆ subtype_v

template<typename E , typename D = std::decay_t<E>>
constexpr auto magic_enum::detail::subtype_v = subtype<D>(std::is_enum<D>{})
inlineconstexpr

Definition at line 809 of file magic_enum.hpp.

◆ type_name_v

template<typename E >
constexpr auto magic_enum::detail::type_name_v = type_name<E>()
inlineconstexpr

Definition at line 490 of file magic_enum.hpp.

◆ values_v

template<typename E , enum_subtype S>
constexpr auto magic_enum::detail::values_v = values<E, S>()
inlineconstexpr

Definition at line 812 of file magic_enum.hpp.



behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Jun 28 2024 02:20:10