Commit 618f94f5 authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

util/TemplateString: add StringView cast operator

parent ad2c2284
......@@ -30,6 +30,8 @@
#ifndef TEMPLATE_STRING_HXX
#define TEMPLATE_STRING_HXX
#include "StringView.hxx"
#include <array> // for std::size()
#include <cstddef>
#include <string_view>
......@@ -48,6 +50,10 @@ struct Buffer {
constexpr operator std::string_view() const noexcept {
return {value, size};
}
constexpr operator StringView() const noexcept {
return {value, size};
}
};
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment