Add matching operator!= for asymmetric operator==

This helps clang to compile target in C++20 mode.

Context: https://github.com/llvm/llvm-project/issues/57711
This commit is contained in:
Utkarsh Saxena
2022-10-18 16:47:01 +02:00
committed by GitHub
parent d6bfdbf889
commit 1d61437727

View File

@@ -274,8 +274,12 @@ struct ValueOwnershipKind {
bool operator==(ValueOwnershipKind other) const {
return value == other.value;
}
bool operator!=(ValueOwnershipKind other) const {
return !(value == other.value);
}
bool operator==(innerty other) const { return value == other; }
bool operator!=(innerty other) const { return !(value == other); }
/// We merge by moving down the lattice.
ValueOwnershipKind merge(ValueOwnershipKind rhs) const {