diff --git a/src/util/SpanCast.hxx b/src/util/SpanCast.hxx index 3aec5dfa4..e5b927cd5 100644 --- a/src/util/SpanCast.hxx +++ b/src/util/SpanCast.hxx @@ -34,7 +34,7 @@ #include #include -template +template using CopyConst = std::conditional_t, const To, To>; /** @@ -43,7 +43,7 @@ using CopyConst = std::conditional_t, const To, To>; */ template constexpr std::span -FromBytesFloor(std::span> other) noexcept +FromBytesFloor(std::span> other) noexcept { static_assert(sizeof(T) > 0, "Empty base type"); @@ -51,7 +51,7 @@ FromBytesFloor(std::span> other) noexcept warnings, but should we really suppress them? */ return { - reinterpret_cast(reinterpret_cast *>(other.data())), + reinterpret_cast(reinterpret_cast *>(other.data())), other.size() / sizeof(T), }; } @@ -61,7 +61,7 @@ FromBytesFloor(std::span> other) noexcept */ template constexpr std::span -FromBytesStrict(std::span> other) noexcept +FromBytesStrict(std::span> other) noexcept { assert(other.size() % sizeof(T) == 0);