From 618f94f5891dff7bf894edcdd9ed200c8418f4f6 Mon Sep 17 00:00:00 2001
From: Max Kellermann <mk@cm4all.com>
Date: Fri, 23 Oct 2020 13:11:16 +0200
Subject: [PATCH] util/TemplateString: add StringView cast operator

---
 src/util/TemplateString.hxx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/util/TemplateString.hxx b/src/util/TemplateString.hxx
index 447992242..a456459a1 100644
--- a/src/util/TemplateString.hxx
+++ b/src/util/TemplateString.hxx
@@ -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};
+	}
 };
 
 /**