Add operator== for DefinedAtom::reference_iterator. NFC.

This will be used by a future commit which wanted to compare iterators
for equality.

Also changed operator!= to be in terms of the new operator==

llvm-svn: 259431
This commit is contained in:
Pete Cooper 2016-02-01 23:05:20 +00:00
parent 5be17b6e3e
commit bddf6c8c57
1 changed files with 5 additions and 1 deletions

View File

@ -308,8 +308,12 @@ public:
return _atom.derefIterator(_it);
}
bool operator==(const reference_iterator &other) const {
return _it == other._it;
}
bool operator!=(const reference_iterator &other) const {
return _it != other._it;
return !(*this == other);
}
reference_iterator &operator++() {