From 64598bc0f724ae123dc0ecc734cbd0ccc6de552b Mon Sep 17 00:00:00 2001 From: Neil MacIntosh Date: Tue, 14 Jun 2016 20:20:09 -0700 Subject: [PATCH] Cleaned up last() functions to match spec. --- include/span.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/span.h b/include/span.h index 3e0ccc9..00225ba 100644 --- a/include/span.h +++ b/include/span.h @@ -388,7 +388,7 @@ public: constexpr span last() const { Expects(Count >= 0 && Count <= size()); - return{ Count == 0 ? data() : data() + (size() - Count), Count }; + return{ data() + (size() - Count), Count }; } template @@ -408,7 +408,7 @@ public: constexpr span last(index_type count) const { Expects(count >= 0 && count <= size()); - return { count == 0 ? data() : data() + (size() - count), count }; + return { data() + (size() - count), count }; } constexpr span subspan(index_type offset,