Browse Source

add operator== for question/section iterators

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1348 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 15 years ago
parent
commit
5df12b30a0
2 changed files with 8 additions and 0 deletions
  1. 7 0
      src/lib/dns/message.cc
  2. 1 0
      src/lib/dns/message.h

+ 7 - 0
src/lib/dns/message.cc

@@ -895,6 +895,13 @@ SectionIterator<T>::operator->() const
 
 template <typename T>
 bool
+SectionIterator<T>::operator==(const SectionIterator<T>& other) const
+{
+    return (impl_->it_ == other.impl_->it_);
+}
+
+template <typename T>
+bool
 SectionIterator<T>::operator!=(const SectionIterator<T>& other) const
 {
     return (impl_->it_ != other.impl_->it_);

+ 1 - 0
src/lib/dns/message.h

@@ -486,6 +486,7 @@ public:
     SectionIterator<T> operator++(int);
     const T& operator*() const;
     const T* operator->() const;
+    bool operator==(const SectionIterator<T>& other) const;
     bool operator!=(const SectionIterator<T>& other) const;
 private:
     SectionIteratorImpl<T>* impl_;