Commit 3796247d authored by Max Kellermann's avatar Max Kellermann

util/Stringview: use `const_pointer` instead of hard-coding `const char *`

Fixes Windows build failure.
parent 332f480e
...@@ -45,6 +45,7 @@ struct BasicStringView : ConstBuffer<T> { ...@@ -45,6 +45,7 @@ struct BasicStringView : ConstBuffer<T> {
using typename ConstBuffer<T>::size_type; using typename ConstBuffer<T>::size_type;
using typename ConstBuffer<T>::value_type; using typename ConstBuffer<T>::value_type;
using typename ConstBuffer<T>::pointer; using typename ConstBuffer<T>::pointer;
using typename ConstBuffer<T>::const_pointer;
using ConstBuffer<T>::data; using ConstBuffer<T>::data;
using ConstBuffer<T>::size; using ConstBuffer<T>::size;
...@@ -97,7 +98,7 @@ struct BasicStringView : ConstBuffer<T> { ...@@ -97,7 +98,7 @@ struct BasicStringView : ConstBuffer<T> {
return {data + pos, size - pos}; return {data + pos, size - pos};
} }
constexpr BasicStringView<T> substr(const char *start) const noexcept { constexpr BasicStringView<T> substr(const_pointer start) const noexcept {
return {start, size_t(data + size - start)}; return {start, size_t(data + size - start)};
} }
......
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