diff --git a/src/util/SpanCast.hxx b/src/util/SpanCast.hxx index 11254c48c..ea2a870bb 100644 --- a/src/util/SpanCast.hxx +++ b/src/util/SpanCast.hxx @@ -33,13 +33,16 @@ #include #include +template +using CopyConst = std::conditional_t, const To, To>; + /** * Cast a std::span to a std::span, rounding down to the * next multiple of T's size. */ template constexpr std::span -FromBytesFloor(std::span other) noexcept +FromBytesFloor(std::span> other) noexcept { static_assert(sizeof(T) > 0, "Empty base type");