mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user