diff --git a/BAN/include/BAN/Iterators.h b/BAN/include/BAN/Iterators.h index 003c578428..8af78e6b4a 100644 --- a/BAN/include/BAN/Iterators.h +++ b/BAN/include/BAN/Iterators.h @@ -119,6 +119,22 @@ namespace BAN return temp; } + size_t operator-(const IteratorSimpleGeneral& other) const + { + ASSERT(m_pointer); + return m_pointer - other.m_pointer; + } + + IteratorSimpleGeneral operator+(size_t offset) const + { + return IteratorSimpleGeneral(m_pointer + offset); + } + + IteratorSimpleGeneral operator-(size_t offset) const + { + return IteratorSimpleGeneral(m_pointer - offset); + } + bool operator==(const IteratorSimpleGeneral& other) const { return m_pointer == other.m_pointer; @@ -128,7 +144,7 @@ namespace BAN return !(*this == other); } - operator bool() const + explicit operator bool() const { return m_pointer; } @@ -233,7 +249,7 @@ namespace BAN return !(*this == other); } - operator bool() const + explicit operator bool() const { return m_outer_end && m_outer_current; }