Skip to content

Commit bd830d9

Browse files
authored
Merge pull request #61613 from usx95/patch-1
Add matching operator!= for asymmetric operator==
2 parents d13e555 + 1d61437 commit bd830d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/swift/SIL/SILValue.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,12 @@ struct ValueOwnershipKind {
274274
bool operator==(ValueOwnershipKind other) const {
275275
return value == other.value;
276276
}
277+
bool operator!=(ValueOwnershipKind other) const {
278+
return !(value == other.value);
279+
}
277280

278281
bool operator==(innerty other) const { return value == other; }
282+
bool operator!=(innerty other) const { return !(value == other); }
279283

280284
/// We merge by moving down the lattice.
281285
ValueOwnershipKind merge(ValueOwnershipKind rhs) const {

0 commit comments

Comments
 (0)