From 49e7ed1ebfcf80fcfd60c53d35f7a782b6e030a3 Mon Sep 17 00:00:00 2001 From: "Jordan Maples [MSFT]" <49793787+JordanMaples@users.noreply.github.com> Date: Mon, 3 Feb 2020 18:27:09 -0800 Subject: [PATCH] updating comparisons --- include/gsl/span | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/gsl/span b/include/gsl/span index 16add83..170c746 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -271,7 +271,7 @@ namespace details std::enable_if_t<std::is_same<std::remove_cv_t<Type2>, value_type>::value, int> = 0> constexpr bool operator<=(const span_iterator<Type2>& rhs) const noexcept { - return !(*this > rhs); + return !(rhs < *this); } template < @@ -279,7 +279,7 @@ namespace details std::enable_if_t<std::is_same<std::remove_cv_t<Type2>, value_type>::value, int> = 0> constexpr bool operator>=(const span_iterator<Type2>& rhs) const noexcept { - return *!(this < rhs); + return !(*this < rhs); } #ifdef _MSC_VER