diff --git a/include/fc/io/enum_type.hpp b/include/fc/io/enum_type.hpp index d731c6d..9aa1050 100644 --- a/include/fc/io/enum_type.hpp +++ b/include/fc/io/enum_type.hpp @@ -3,7 +3,6 @@ #include #include - namespace fc { template @@ -18,8 +17,9 @@ namespace fc enum_type(){} - operator IntType()const { return static_cast(value); } - operator EnumType()const { return value; } + operator IntType()const { return static_cast(value); } + operator EnumType()const { return value; } + operator std::string()const { return fc::reflector::to_string(value); } enum_type& operator=( IntType i ) { value = (EnumType)i; return *this;} enum_type& operator=( EnumType i ) { value = i; return *this;}