diff --git a/include/gsl/multi_span b/include/gsl/multi_span index f697093..9c0c27b 100644 --- a/include/gsl/multi_span +++ b/include/gsl/multi_span @@ -612,7 +612,7 @@ public: } constexpr static_bounds(std::initializer_list il) - : m_ranges(static_cast(il.begin())) + : m_ranges(il.begin()) { // Size of the initializer list must match the rank of the array Expects((MyRanges::DynamicNum == 0 && il.size() == 1 && *il.begin() == static_size) || @@ -1686,7 +1686,7 @@ constexpr auto as_multi_span(multi_span s) GSL_NOEXCEPT static_assert( std::is_trivial>::value && (ByteSpan::bounds_type::static_size == dynamic_range || - ByteSpan::bounds_type::static_size % static_cast(sizeof(U)) == 0), + ByteSpan::bounds_type::static_size % sizeof(U) == 0), "Target type must be a trivial type and its size must match the byte array size"); Expects((s.size_bytes() % sizeof(U)) == 0);