fc::enum_type -> string
This commit is contained in:
parent
f5fa11bc36
commit
61f84777c4
1 changed files with 3 additions and 3 deletions
|
|
@ -3,7 +3,6 @@
|
|||
#include <fc/io/raw_fwd.hpp>
|
||||
#include <fc/variant.hpp>
|
||||
|
||||
|
||||
namespace fc
|
||||
{
|
||||
template<typename IntType, typename EnumType>
|
||||
|
|
@ -20,6 +19,7 @@ namespace fc
|
|||
|
||||
operator IntType()const { return static_cast<IntType>(value); }
|
||||
operator EnumType()const { return value; }
|
||||
operator std::string()const { return fc::reflector<EnumType>::to_string(value); }
|
||||
|
||||
enum_type& operator=( IntType i ) { value = (EnumType)i; return *this;}
|
||||
enum_type& operator=( EnumType i ) { value = i; return *this;}
|
||||
|
|
|
|||
Loading…
Reference in a new issue