Skip to content

Commit 79178ce

Browse files
Merge pull request #3979 from thomasspriggs/tas/symbol_not_equal
Add `!=` operator to `symbolt`
2 parents d91a7b9 + 64ce13d commit 79178ce

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/util/symbol.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,8 @@ bool symbolt::operator==(const symbolt &other) const
228228
is_volatile == other.is_volatile;
229229
// clang-format on
230230
}
231+
232+
bool symbolt::operator!=(const symbolt &other) const
233+
{
234+
return !(*this == other);
235+
}

src/util/symbol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class symbolt
126126
bool is_well_formed() const;
127127

128128
bool operator==(const symbolt &other) const;
129+
bool operator!=(const symbolt &other) const;
129130
};
130131

131132
std::ostream &operator<<(std::ostream &out, const symbolt &symbol);

0 commit comments

Comments
 (0)