diff --git a/src/util/SpanCast.hxx b/src/util/SpanCast.hxx index 11f5b60ce..58e25c85a 100644 --- a/src/util/SpanCast.hxx +++ b/src/util/SpanCast.hxx @@ -96,3 +96,17 @@ ToStringView(std::span s) noexcept { return ToStringView(FromBytesStrict(s)); } + +template +constexpr std::basic_string_view +ToStringView(std::span s) noexcept +{ + return {s.data(), s.size()}; +} + +template +constexpr std::basic_string_view +ToStringView(std::span s) noexcept +{ + return {s.data(), s.size()}; +}