Adding operator== for document_iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154927 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manuel Klimek 2012-04-17 16:38:41 +00:00
parent 93751c8c99
commit 388774c02a

View File

@ -516,8 +516,11 @@ public:
document_iterator() : Doc(NullDoc) {}
document_iterator(OwningPtr<Document> &D) : Doc(D) {}
bool operator ==(const document_iterator &Other) {
return Doc == Other.Doc;
}
bool operator !=(const document_iterator &Other) {
return Doc != Other.Doc;
return !(*this == Other);
}
document_iterator operator ++() {