diff --git a/gsl/span b/gsl/span index d2e16dc..a9a3322 100644 --- a/gsl/span +++ b/gsl/span @@ -132,8 +132,7 @@ namespace details template struct is_allowed_element_type_conversion - : public std::integral_constant>::value || - std::is_convertible::value> + : public std::integral_constant::value> { }; @@ -420,8 +419,7 @@ public: details::is_allowed_extent_conversion::value && details::is_allowed_element_type_conversion::value>> constexpr span(const span& other) - : storage_(static_cast(other.data()), - details::extent_type(other.size())) + : storage_(other.data(), details::extent_type(other.size())) { } @@ -431,8 +429,7 @@ public: details::is_allowed_extent_conversion::value && details::is_allowed_element_type_conversion::value>> constexpr span(span&& other) - : storage_(static_cast(other.data()), - details::extent_type(other.size())) + : storage_(other.data(), details::extent_type(other.size())) { } @@ -626,7 +623,7 @@ as_writeable_bytes(span s) noexcept // Specialization of gsl::at for span template -constexpr ElementType& at(const span& s, size_t index) +constexpr ElementType& at(const span& s, size_t index) { // No bounds checking here because it is done in span::operator[] called below return s[index];