diff --git a/DataStructures/DeallocatingVector.h b/DataStructures/DeallocatingVector.h index 3b706818d..db16d0e01 100644 --- a/DataStructures/DeallocatingVector.h +++ b/DataStructures/DeallocatingVector.h @@ -83,10 +83,18 @@ protected: return (mData == other.mData) && (mIndex == other.mIndex) && (mBucketList == other.mBucketList); } - inline bool operator<(const DeallocatingVectorIteratorState &other) { + bool operator<(const DeallocatingVectorIteratorState &other) const { return mIndex < other.mIndex; } + bool operator>(const DeallocatingVectorIteratorState &other) const { + return mIndex > other.mIndex; + } + + bool operator>=(const DeallocatingVectorIteratorState &other) const { + return mIndex >= other.mIndex; + } + //This is a hack to make assignment operator possible with reference member inline DeallocatingVectorIteratorState& operator= (const DeallocatingVectorIteratorState &a) { if (this != &a) { @@ -136,7 +144,7 @@ public: mState.mIndex++; mState.setPointerForIndex(); return DeallocatingVectorIterator(_myState); } - inline DeallocatingVectorIterator operator --(int) { //postfix + inline DeallocatingVectorIterator operator--(int) { //postfix if(DeallocateC) assert(false); DeallocatingVectorIteratorState _myState(mState); mState.mIndex--; mState.setPointerForIndex(); @@ -149,7 +157,7 @@ public: return DeallocatingVectorIterator(_myState); } - inline DeallocatingVectorIterator& operator+=(const difference_type& n) const { + inline DeallocatingVectorIterator& operator+=(const difference_type& n) { mState.mIndex+=n; return *this; } @@ -182,10 +190,18 @@ public: return mState == other.mState; } - bool operator<(const DeallocatingVectorIterator & other) { + inline bool operator<(const DeallocatingVectorIterator & other) const { return mState < other.mState; } + inline bool operator>(const DeallocatingVectorIterator & other) const { + return mState > other.mState; + } + + inline bool operator>=(const DeallocatingVectorIterator & other) const { + return mState >= other.mState; + } + difference_type operator-(const DeallocatingVectorIterator & other) { if(DeallocateC) assert(false); return mState.mIndex-other.mState.mIndex;