util/StringView: add ConstBuffer cast constructors

This commit is contained in:
Max Kellermann 2018-08-20 15:34:07 +02:00
parent e85b9960f0
commit fe6de14faf

View File

@ -44,6 +44,12 @@ struct BasicStringView : ConstBuffer<T> {
BasicStringView() = default;
explicit constexpr BasicStringView(ConstBuffer<T> src)
:ConstBuffer<T>(src) {}
explicit constexpr BasicStringView(ConstBuffer<void> src)
:ConstBuffer<T>(ConstBuffer<T>::FromVoid(src)) {}
constexpr BasicStringView(pointer_type _data, size_type _size) noexcept
:ConstBuffer<T>(_data, _size) {}