diff --git a/include/gsl/span_ext b/include/gsl/span_ext index 8b2c2c948..c38b5b14b 100644 --- a/include/gsl/span_ext +++ b/include/gsl/span_ext @@ -149,7 +149,7 @@ constexpr ElementType& at(span s, index i) template constexpr std::ptrdiff_t ssize(const span& s) noexcept { - return static_cast(s.size()); + return gsl::narrow_cast(s.size()); } // [span.iter] Free functions for begin/end functions