diff --git a/src/utf8_iterator.hh b/src/utf8_iterator.hh index 5980ea7c..eed250e9 100644 --- a/src/utf8_iterator.hh +++ b/src/utf8_iterator.hh @@ -15,10 +15,12 @@ namespace utf8 // on unicode codepoints instead. template -class iterator : public std::iterator { public: + iterator() = default; + iterator(Iterator it, Iterator begin, Iterator end) : m_it{std::move(it)}, m_begin{std::move(begin)}, m_end{std::move(end)} {} @@ -78,8 +80,8 @@ public: return res; } - bool operator==(const iterator& other) { return m_it == other.m_it; } - bool operator!=(const iterator& other) { return m_it != other.m_it; } + bool operator==(const iterator& other) const { return m_it == other.m_it; } + bool operator!=(const iterator& other) const { return m_it != other.m_it; } bool operator< (const iterator& other) const { return m_it < other.m_it; } bool operator<= (const iterator& other) const { return m_it <= other.m_it; }