From f2ab3a5c546385df138063235ad61e1ec1ee7845 Mon Sep 17 00:00:00 2001 From: Neil MacIntosh Date: Wed, 20 Jul 2016 09:24:49 -0700 Subject: [PATCH] Tidying up noexcepts. --- include/span.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/span.h b/include/span.h index 13e57ae..96164b6 100644 --- a/include/span.h +++ b/include/span.h @@ -392,17 +392,17 @@ public: {} template - constexpr span(std::array& arr) + constexpr span(std::array& arr) noexcept : storage_(&arr[0], extent_type()) {} template ::value>> - constexpr span(std::array, N>& arr) + constexpr span(std::array, N>& arr) noexcept : storage_(&arr[0], extent_type()) {} template ::value>> - constexpr span(const std::array, N>& arr) + constexpr span(const std::array, N>& arr) noexcept : storage_(&arr[0], extent_type()) {} @@ -504,7 +504,7 @@ public: constexpr reference operator[](index_type idx) const { Expects(idx >= 0 && idx < storage_.size()); - return storage_.data()[idx]; + return data()[idx]; } constexpr reference operator()(index_type idx) const { return this->operator[](idx); } constexpr pointer data() const noexcept { return storage_.data(); }