|
hoshi-lang dev
Yet another programming language
|
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<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 | values_t = decltype((values_v< D, S >)) |
| 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 | entries_t = decltype((entries_v< D, S >)) |
| 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 T , std::enable_if_t< std::is_enum_v< std::decay_t< T > >, int > = 0> | |
| using | enum_concept = T |
Enumerations | |
| enum class | enum_subtype { common , flags } |
Functions | |
| 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 BinaryPredicate > | |
| constexpr bool | cmp_equal (string_view lhs, string_view rhs, BinaryPredicate &&p) noexcept(is_nothrow_invocable< BinaryPredicate >()) |
| template<typename L , typename R > | |
| constexpr bool | cmp_less (L lhs, R rhs) noexcept |
| template<typename I > | |
| constexpr I | log2 (I value) 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 | n () noexcept |
| template<typename E > | |
| constexpr auto | type_name () noexcept |
| template<typename E , E V> | |
| constexpr auto | enum_name () noexcept |
| template<typename E , auto V> | |
| constexpr bool | is_valid () 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 , 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, typename U = std::underlying_type_t<E>> | |
| constexpr int | reflected_min () 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, std::size_t Size, int Min, std::size_t I> | |
| constexpr void | valid_count (bool *valid, std::size_t &count) 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> | |
| constexpr auto | values () noexcept |
| template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>> | |
| constexpr auto | values () noexcept |
| template<typename E , typename U = std::underlying_type_t<E>> | |
| constexpr enum_subtype | subtype (std::true_type) noexcept |
| template<typename T > | |
| constexpr enum_subtype | subtype (std::false_type) 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, std::size_t... I> | |
| constexpr auto | entries (std::index_sequence< I... >) noexcept |
| template<typename E , enum_subtype S, typename U = std::underlying_type_t<E>> | |
| constexpr bool | is_sparse () noexcept |
Variables | |
| template<typename... T> | |
| constexpr bool | always_false_v = false |
| 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 > | |
| constexpr auto | type_name_v = type_name<E>() |
| template<typename E , E V> | |
| constexpr auto | enum_name_v = enum_name<E, V>() |
| template<typename E , typename D = std::decay_t<E>> | |
| constexpr auto | subtype_v = subtype<D>(std::is_enum<D>{}) |
| template<typename E , enum_subtype S> | |
| constexpr auto | values_v = values<E, S>() |
| template<typename E , enum_subtype S> | |
| constexpr auto | count_v = values_v<E, S>.size() |
| 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, 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> | |
| constexpr auto | names_v = names<E, S>(std::make_index_sequence<count_v<E, S>>{}) |
| template<typename E , enum_subtype S> | |
| constexpr auto | entries_v = entries<E, S>(std::make_index_sequence<count_v<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> | |
| constexpr bool | is_reflected_v = is_reflected<std::decay_t<E>, S>{} |
| 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 |
Definition at line 893 of file magic_enum.h.
| using entries_t = decltype((entries_v<D, S>)) |
Definition at line 852 of file magic_enum.h.
| using enum_concept = T |
Definition at line 896 of file magic_enum.h.
| using enum_constant = std::integral_constant<E, V> |
Definition at line 228 of file magic_enum.h.
| using names_t = decltype((names_v<D, S>)) |
Definition at line 840 of file magic_enum.h.
| using values_t = decltype((values_v<D, S>)) |
Definition at line 819 of file magic_enum.h.
|
strong |
| Enumerator | |
|---|---|
| common | |
| flags | |
Definition at line 649 of file magic_enum.h.
|
constexprnoexcept |
Definition at line 347 of file magic_enum.h.
|
constexprnoexcept |
Definition at line 375 of file magic_enum.h.
Referenced by reflected_max(), and reflected_min().

|
constexprnoexcept |
Definition at line 843 of file magic_enum.h.
References entries().
Referenced by entries().


|
constexprnoexcept |
Definition at line 600 of file magic_enum.h.
References magic_enum::customize::detail::custom_tag, magic_enum::customize::detail::default_tag, magic_enum::customize::detail::invalid_tag, and static_str< N >::size().

|
constexprnoexcept |
Definition at line 312 of file magic_enum.h.
|
constexprnoexcept |
Definition at line 335 of file magic_enum.h.
|
constexpr |
Definition at line 341 of file magic_enum.h.
|
constexprnoexcept |
|
constexprnoexcept |
Definition at line 625 of file magic_enum.h.
References magic_enum::customize::detail::custom_tag, and magic_enum::customize::detail::default_tag.
|
constexprnoexcept |
Definition at line 395 of file magic_enum.h.
References MAGIC_ENUM_ASSERT, and value().
Referenced by magic_enum::enum_value(), and is_sparse().


|
constexprnoexcept |
Definition at line 421 of file magic_enum.h.
References str_view::size_, and str_view::str_.
|
constexprnoexcept |
Definition at line 831 of file magic_enum.h.
References names().
Referenced by names().


|
constexprnoexcept |
Definition at line 689 of file magic_enum.h.
References cmp_less(), and flags.

|
constexprnoexcept |
Definition at line 673 of file magic_enum.h.
References cmp_less(), and flags.

|
constexprnoexcept |
Definition at line 807 of file magic_enum.h.
References common.
|
constexprnoexcept |
Definition at line 781 of file magic_enum.h.
|
constexprnoexcept |
Definition at line 412 of file magic_enum.h.
Referenced by values().

|
constexprnoexcept |
Definition at line 476 of file magic_enum.h.
References magic_enum::customize::detail::custom_tag, magic_enum::customize::detail::default_tag, magic_enum::customize::detail::invalid_tag, and static_str< N >::size().

|
constexprnoexcept |
Definition at line 655 of file magic_enum.h.
References flags.
|
constexprnoexcept |
Definition at line 739 of file magic_enum.h.
References valid_count_t< N >::count, and valid_count_t< N >::valid.
|
constexprnoexcept |
Definition at line 715 of file magic_enum.h.
References MAGIC_ENUM_FOR_EACH_256, and MAGIC_ENUM_V.
|
constexprnoexcept |
Definition at line 668 of file magic_enum.h.
Referenced by log2().

|
constexprnoexcept |
Definition at line 746 of file magic_enum.h.
References to_array(), and values().
Referenced by values().


|
constexprnoexcept |
Definition at line 771 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 231 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 822 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 849 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 622 of file magic_enum.h.
Referenced by magic_enum::enum_name().
|
inlineconstexpr |
Definition at line 418 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 881 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 870 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 828 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 825 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 837 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 813 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 494 of file magic_enum.h.
|
inlineconstexpr |
Definition at line 816 of file magic_enum.h.