fc::enum_type -> string

This commit is contained in:
Daniel Larimer 2013-07-30 15:04:17 -04:00
parent f5fa11bc36
commit 61f84777c4

View file

@ -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;}