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(); }