Commit 5088364b by David Stone Committed by Wenzel Jakob

Declare `operator==` and `operator!=` member functions const.

parent 6ebfc4b2
...@@ -288,8 +288,8 @@ public: ...@@ -288,8 +288,8 @@ public:
// Past-the-end iterator: // Past-the-end iterator:
iterator(size_t end) : curr(end) {} iterator(size_t end) : curr(end) {}
public: public:
bool operator==(const iterator &other) { return curr.index == other.curr.index; } bool operator==(const iterator &other) const { return curr.index == other.curr.index; }
bool operator!=(const iterator &other) { return curr.index != other.curr.index; } bool operator!=(const iterator &other) const { return curr.index != other.curr.index; }
iterator &operator++() { iterator &operator++() {
if (!inst->simple_layout) if (!inst->simple_layout)
curr.vh += 1 + (*types)[curr.index]->holder_size_in_ptrs; curr.vh += 1 + (*types)[curr.index]->holder_size_in_ptrs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment