10 #pragma warning (push)
11 #pragma warning (disable : 4244)
35 explicit uint128(
unsigned __int128 i ):
hi( i >> 64 ),
lo(i){ }
37 operator std::string()
const;
40 explicit operator unsigned __int128()
const {
41 unsigned __int128 result(
hi);
112 const uint64_t max64 = std::numeric_limits<uint64_t>::max();
113 return uint128( max64, max64 );
124 static_assert(
sizeof(
uint128) == 2*
sizeof(
uint64_t),
"validate packing assumptions" );
135 template<
typename Stream>
137 template<
typename Stream>
147 struct hash<
fc::uint128>
159 #pragma warning (pop)
an implementation of 128 bit unsigned integer
uint64_t high_bits() const
uint128(uint64_t _h, uint64_t _l)
bool operator!=(const uint128 &o) const
static uint128 max_value()
uint128 & operator>>=(const uint128 &u)
uint128 operator-() const
friend bool operator<=(const uint128 &l, const uint128 &r)
uint32_t to_integer() const
uint128 & operator|=(const uint128 &u)
uint64_t to_uint64() const
uint128 & operator-=(const uint128 &u)
uint128 & operator%=(const uint128 &u)
friend uint128 operator+(const uint128 &l, const uint128 &r)
uint128 & operator^=(const uint128 &u)
uint128(unsigned __int128 i)
static void full_product(const uint128 &a, const uint128 &b, uint128 &result_hi, uint128 &result_lo)
friend uint128 operator|(const uint128 &l, const uint128 &r)
uint128 & operator/=(const uint128 &u)
friend uint128 operator*(const uint128 &l, const uint128 &r)
uint128 & operator*=(const uint128 &u)
friend uint128 operator&(const uint128 &l, const uint128 &r)
friend uint128 operator^(const uint128 &l, const uint128 &r)
friend uint128 operator>>(const uint128 &l, const uint128 &r)
friend bool operator>=(const uint128 &l, const uint128 &r)
uint64_t low_bits() const
friend bool operator>(const uint128 &l, const uint128 &r)
uint128 & operator&=(const uint128 &u)
uint128 operator~() const
bool operator<(const uint128 &o) const
bool operator==(const uint128 &o) const
friend uint128 operator%(const uint128 &l, const uint128 &r)
uint128 & operator+=(const uint128 &u)
friend uint128 operator/(const uint128 &l, const uint128 &r)
friend std::size_t hash_value(const uint128 &v)
uint32_t low_32_bits() const
friend uint128 operator<<(const uint128 &l, const uint128 &r)
uint128 & operator<<=(const uint128 &u)
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Concept for reading and writing characters.
Defines exception's used by fc.
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
void unpack(Stream &s, std::deque< T > &value)
void pack(Stream &s, const std::deque< T > &value)
size_t city_hash_size_t(const char *buf, size_t len)
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)
void to_variant(const sysio::chain::shared_public_key &var, fc::variant &vo)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
unsigned __int64 uint64_t
size_t operator()(const fc::uint128 &s) const