uint128.hpp: Reflect uint128

This commit is contained in:
theoreticalbts 2015-05-05 18:40:31 -04:00
parent 5dabe6ba2c
commit 3bf3b0c9b4

View file

@ -102,10 +102,9 @@ namespace fc
static void full_product( const uint128& a, const uint128& b, uint128& result_hi, uint128& result_lo ); static void full_product( const uint128& a, const uint128& b, uint128& result_hi, uint128& result_lo );
private: // fields must be public for serialization
uint64_t hi; uint64_t hi;
uint64_t lo; uint64_t lo;
}; };
static_assert( sizeof(uint128) == 2*sizeof(uint64_t), "validate packing assumptions" ); static_assert( sizeof(uint128) == 2*sizeof(uint64_t), "validate packing assumptions" );
@ -139,6 +138,8 @@ namespace std
}; };
} }
FC_REFLECT( fc::uint128_t, (hi)(lo) )
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning (pop) #pragma warning (pop)
#endif ///_MSC_VER #endif ///_MSC_VER