1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-10 23:44:29 +00:00

remove is_fixed_enum

non stable and useless
This commit is contained in:
neargye 2019-10-02 17:06:36 +05:00
parent c947afdbae
commit 105c8f067e
4 changed files with 0 additions and 30 deletions

View file

@ -314,12 +314,6 @@ struct is_unscoped_enum : std::false_type {};
template <typename T>
struct is_unscoped_enum<T, true> : std::bool_constant<std::is_convertible_v<T, std::underlying_type_t<T>>> {};
template <typename T, typename = T>
struct is_fixed_enum : std::false_type {};
template <typename T>
struct is_fixed_enum<T, decltype(T{0})> : std::is_enum<T> {};
template <typename T, bool = std::is_enum_v<T>>
struct underlying_type {};
@ -347,14 +341,6 @@ struct is_scoped_enum : detail::is_scoped_enum<T> {};
template <typename T>
inline constexpr bool is_scoped_enum_v = is_scoped_enum<T>::value;
// Checks whether T is an Fixed enumeration type.
// Provides the member constant value which is equal to true, if T is an [Fixed enumeration](https://en.cppreference.com/w/cpp/language/enum) type. Otherwise, value is equal to false.
template <typename T>
struct is_fixed_enum : detail::is_fixed_enum<T> {};
template <typename T>
inline constexpr bool is_fixed_enum_v = is_fixed_enum<T>::value;
// If T is a complete enumeration type, provides a member typedef type that names the underlying type of T.
// Otherwise, if T is not an enumeration type, there is no member type. Otherwise (T is an incomplete enumeration type), the program is ill-formed.
template <typename T>
@ -375,7 +361,6 @@ struct enum_traits<E, std::enable_if_t<detail::is_enum_v<E>>> {
inline static constexpr bool is_unscoped_enum = is_unscoped_enum_v<E>;
inline static constexpr bool is_scoped_enum = is_scoped_enum_v<E>;
inline static constexpr bool is_fixed_enum = is_fixed_enum_v<E>;
inline static constexpr std::size_t count = detail::count_v<E>;
inline static constexpr std::array<E, count> values = detail::values<E>(detail::range_v<E>);