Commit db23c2f2 authored by Max Kellermann's avatar Max Kellermann

util/StringView: allow casting from BasicStringView to StringView

parent 9744f437
...@@ -112,12 +112,18 @@ struct BasicStringView : ConstBuffer<T> { ...@@ -112,12 +112,18 @@ struct BasicStringView : ConstBuffer<T> {
struct StringView : BasicStringView<char> { struct StringView : BasicStringView<char> {
using BasicStringView::BasicStringView; using BasicStringView::BasicStringView;
constexpr StringView(BasicStringView<value_type> src) noexcept
:BasicStringView(src) {}
}; };
#ifdef _UNICODE #ifdef _UNICODE
struct WStringView : BasicStringView<wchar_t> { struct WStringView : BasicStringView<wchar_t> {
using BasicStringView::BasicStringView; using BasicStringView::BasicStringView;
constexpr WStringView(BasicStringView<value_type> src) noexcept
:BasicStringView(src) {}
}; };
#endif #endif
......
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