From 500ff5c27003d1de0225a75df261c674902f5059 Mon Sep 17 00:00:00 2001 From: aadebuger Date: Thu, 16 Mar 2017 12:28:57 +0800 Subject: [PATCH] Update range.h --- include/range.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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_;