forked from OSchip/llvm-project
[libc++] Give `MoveOnly` all six comparison operators, not just == and <.
Split out of D93512.
This commit is contained in:
parent
927af4b3c5
commit
fc3192026b
|
@ -32,7 +32,11 @@ public:
|
|||
constexpr int get() const {return data_;}
|
||||
|
||||
constexpr bool operator==(const MoveOnly& x) const {return data_ == x.data_;}
|
||||
constexpr bool operator!=(const MoveOnly& x) const {return data_ != x.data_;}
|
||||
constexpr bool operator< (const MoveOnly& x) const {return data_ < x.data_;}
|
||||
constexpr bool operator<=(const MoveOnly& x) const {return data_ <= x.data_;}
|
||||
constexpr bool operator> (const MoveOnly& x) const {return data_ > x.data_;}
|
||||
constexpr bool operator>=(const MoveOnly& x) const {return data_ >= x.data_;}
|
||||
TEST_CONSTEXPR_CXX14 MoveOnly operator+(const MoveOnly& x) const
|
||||
{ return MoveOnly{data_ + x.data_}; }
|
||||
TEST_CONSTEXPR_CXX14 MoveOnly operator*(const MoveOnly& x) const
|
||||
|
|
Loading…
Reference in New Issue