diff --git a/include/range.h b/include/range.h index f0baf38..33c7afa 100644 --- a/include/range.h +++ b/include/range.h @@ -36,8 +36,8 @@ class Range { const pointer operator->() { return &value_; } bool operator==(const iterator& rhs) { return positive_step_ ? (value_ >= rhs.value_ && value_ > boundary_) : (value_ <= rhs.value_ && value_ < boundary_); } - bool operator!=(const iterator& rhs) { return positive_step_ ? (value_ < rhs.value_ && value_ > boundary_) - : (value_ > rhs.value_ && value_ < boundary_); } + bool operator!=(const iterator& rhs) { return positive_step_ ? (value_ < rhs.value_ && value_ >= boundary_) + : (value_ > rhs.value_ && value_ <= boundary_); } private: value_type value_;