diff --git a/src/util/SpanCast.hxx b/src/util/SpanCast.hxx index e6dc5e665..a97edb6b2 100644 --- a/src/util/SpanCast.hxx +++ b/src/util/SpanCast.hxx @@ -69,6 +69,13 @@ ReferenceAsBytes(const T &value) noexcept return std::as_bytes(std::span{&value, 1}); } +template +constexpr auto +ReferenceAsWritableBytes(T &value) noexcept +{ + return std::as_writable_bytes(std::span{&value, 1}); +} + constexpr std::string_view ToStringView(std::span s) noexcept {