From 9e7df54ccdf24884b4fe2c8d16a39a13bfcd48e5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Sep 2017 19:12:02 +0200 Subject: [PATCH] Util/StringView: add struct TStringView --- src/util/StringView.hxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/util/StringView.hxx b/src/util/StringView.hxx index 1636160e0..dda2edc44 100644 --- a/src/util/StringView.hxx +++ b/src/util/StringView.hxx @@ -126,6 +126,22 @@ struct WStringView : BasicStringView { :BasicStringView(src) {} }; +struct TStringView : WStringView { + using WStringView::WStringView; + + constexpr TStringView(WStringView src) noexcept + :WStringView(src) {} +}; + +#else + +struct TStringView : StringView { + using StringView::StringView; + + constexpr TStringView(StringView src) noexcept + :StringView(src) {} +}; + #endif #endif