From 38f453d608d7012a8d0f93f6c8b1d424c99b9b3e Mon Sep 17 00:00:00 2001 From: Vladislav Yaroslavlev Date: Thu, 3 Nov 2016 23:15:33 +0300 Subject: [PATCH] remove overly optimistic noexcept from some functions --- gsl/span | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gsl/span b/gsl/span index 07c59c5..601580c 100644 --- a/gsl/span +++ b/gsl/span @@ -177,7 +177,7 @@ namespace details return &((*span_)[index_]); } - constexpr span_iterator& operator++() noexcept + constexpr span_iterator& operator++() { Expects(span_ && index_ >= 0 && index_ < span_->length()); ++index_; @@ -191,7 +191,7 @@ namespace details return ret; } - constexpr span_iterator& operator--() noexcept + constexpr span_iterator& operator--() { Expects(span_ && index_ > 0 && index_ <= span_->length()); --index_; @@ -211,7 +211,7 @@ namespace details return ret += n; } - constexpr span_iterator& operator+=(difference_type n) noexcept + constexpr span_iterator& operator+=(difference_type n) { Expects(span_ && (index_ + n) >= 0 && (index_ + n) <= span_->length()); index_ += n; @@ -226,7 +226,7 @@ namespace details constexpr span_iterator& operator-=(difference_type n) noexcept { return *this += -n; } - constexpr difference_type operator-(const span_iterator& rhs) const noexcept + constexpr difference_type operator-(const span_iterator& rhs) const { Expects(span_ == rhs.span_); return index_ - rhs.index_; @@ -246,7 +246,7 @@ namespace details return !(lhs == rhs); } - constexpr friend bool operator<(const span_iterator& lhs, const span_iterator& rhs) noexcept + constexpr friend bool operator<(const span_iterator& lhs, const span_iterator& rhs) { Expects(lhs.span_ == rhs.span_); return lhs.index_ < rhs.index_; @@ -307,7 +307,7 @@ namespace details constexpr extent_type() noexcept {} template - constexpr extent_type(extent_type ext) noexcept + constexpr extent_type(extent_type ext) { static_assert(Other == Ext || Other == dynamic_extent, "Mismatch between fixed-size extent and size of initializing data.");