Add missing operator overloads for fc::unsigned_int

Turns out that bitshares/bitshares-core#1506 is easier if you can
do greater-than comparisons on fc::unsigned_int. Go ahead and add
the complement of missing operators.
This commit is contained in:
Nathan Hourt 2019-02-13 12:18:12 -06:00
parent 8ebd99b786
commit 25ae3222f8

View file

@ -28,6 +28,14 @@ struct unsigned_int {
friend bool operator<( const uint64_t& i, const unsigned_int& v ) { return i < v.value; }
friend bool operator<( const unsigned_int& i, const unsigned_int& v ) { return i.value < v.value; }
friend bool operator<=( const unsigned_int& i, const uint64_t& v ) { return i.value <= v; }
friend bool operator<=( const uint64_t& i, const unsigned_int& v ) { return i <= v.value; }
friend bool operator<=( const unsigned_int& i, const unsigned_int& v ) { return i.value <= v.value; }
friend bool operator>( const unsigned_int& i, const uint64_t& v ) { return i.value > v; }
friend bool operator>( const uint64_t& i, const unsigned_int& v ) { return i > v.value; }
friend bool operator>( const unsigned_int& i, const unsigned_int& v ) { return i.value > v.value; }
friend bool operator>=( const unsigned_int& i, const uint64_t& v ) { return i.value >= v; }
friend bool operator>=( const uint64_t& i, const unsigned_int& v ) { return i >= v.value; }
friend bool operator>=( const unsigned_int& i, const unsigned_int& v ) { return i.value >= v.value; }