| 113 | } |
| 114 | |
| 115 | bool operator==(const stack_iterator& r) const { |
| 116 | if (stacktop == (std::numeric_limits<int>::max)()) { |
| 117 | return r.index == r.stacktop; |
| 118 | } |
| 119 | else if (r.stacktop == (std::numeric_limits<int>::max)()) { |
| 120 | return index == stacktop; |
| 121 | } |
| 122 | return index == r.index; |
| 123 | } |
| 124 | |
| 125 | bool operator!=(const stack_iterator& r) const { |
| 126 | return !(this->operator==(r)); |