util/StringSplit: reimplement without std::distance()
Avoid including <iterator>.
This commit is contained in:
parent
2e5d46c399
commit
3ab3d5555e
@ -47,7 +47,7 @@ constexpr std::pair<std::basic_string_view<T>, std::basic_string_view<T>>
|
|||||||
Partition(const std::basic_string_view<T> haystack,
|
Partition(const std::basic_string_view<T> haystack,
|
||||||
const typename std::basic_string_view<T>::const_pointer position) noexcept
|
const typename std::basic_string_view<T>::const_pointer position) noexcept
|
||||||
{
|
{
|
||||||
return Partition(haystack, std::distance(haystack.data(), position));
|
return Partition(haystack, position - haystack.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
Loading…
Reference in New Issue
Block a user