diff --git a/include/span.h b/include/span.h index 8151737..72d55d6 100644 --- a/include/span.h +++ b/include/span.h @@ -1669,7 +1669,7 @@ constexpr auto as_span(span s) noexcept -> span< ByteSpan::bounds_type::static_size % static_cast(sizeof(U)) == 0), "Target type must be a trivial type and its size must match the byte array size"); - Expects((s.bytes() % sizeof(U)) == 0); + Expects((s.size_bytes() % sizeof(U)) == 0); return {reinterpret_cast(s.data()), s.size_bytes() / narrow_cast(sizeof(U))}; }