77#include " internal/enums/StringConverter.hpp"
88#include " internal/enums/get_enum_names.hpp"
99#include " internal/enums/is_flag_enum.hpp"
10- #include " internal/enums/is_scoped_enum .hpp"
10+ #include " thirdparty/enchantum .hpp"
1111
1212namespace rfl {
1313
1414// Converts an enum value to a string.
15- template <internal::enums::is_scoped_enum EnumType>
15+ template <enchantum::Enum EnumType>
1616std::string enum_to_string (EnumType _enum) {
1717 return rfl::internal::enums::StringConverter<EnumType>::enum_to_string (_enum);
1818}
1919
2020// Converts a string to a value of the given enum type.
21- template <internal::enums::is_scoped_enum EnumType>
21+ template <enchantum::Enum EnumType>
2222rfl::Result<EnumType> string_to_enum (const std::string& _str) {
2323 return rfl::internal::enums::StringConverter<EnumType>::string_to_enum (_str);
2424}
2525
2626// Returns a named tuple mapping names of enumerators of the given enum type to
2727// their values.
28- template <internal::enums::is_scoped_enum EnumType>
28+ template <enchantum::Enum EnumType>
2929auto get_enumerators () {
3030 constexpr auto names = internal::enums::get_enum_names<
3131 EnumType, internal::enums::is_flag_enum<EnumType>>();
@@ -34,7 +34,7 @@ auto get_enumerators() {
3434
3535// Returns a named tuple mapping names of enumerators of the given enum type to
3636// their underlying values.
37- template <internal::enums::is_scoped_enum EnumType>
37+ template <enchantum::Enum EnumType>
3838auto get_underlying_enumerators () {
3939 constexpr auto names = internal::enums::get_enum_names<
4040 EnumType, internal::enums::is_flag_enum<EnumType>>();
@@ -43,7 +43,7 @@ auto get_underlying_enumerators() {
4343
4444// Returns an std::array containing pairs of enumerator names (as
4545// std::string_view) and values.
46- template <internal::enums::is_scoped_enum EnumType>
46+ template <enchantum::Enum EnumType>
4747constexpr auto get_enumerator_array () {
4848 constexpr auto names = internal::enums::get_enum_names<
4949 EnumType, internal::enums::is_flag_enum<EnumType>>();
@@ -52,15 +52,15 @@ constexpr auto get_enumerator_array() {
5252
5353// Returns an std::array containing pairs of enumerator names (as
5454// std::string_view) and underlying values.
55- template <internal::enums::is_scoped_enum EnumType>
55+ template <enchantum::Enum EnumType>
5656constexpr auto get_underlying_enumerator_array () {
5757 constexpr auto names = internal::enums::get_enum_names<
5858 EnumType, internal::enums::is_flag_enum<EnumType>>();
5959 return internal::enums::names_to_underlying_enumerator_array (names);
6060}
6161
6262// Returns the range of the given enum type as a pair of the minimum and maximum
63- template <internal::enums::is_scoped_enum EnumType>
63+ template <enchantum::Enum EnumType>
6464constexpr auto get_enum_range () {
6565 return std::make_pair (
6666 internal::enums::get_range_min<EnumType,
0 commit comments