diff --git a/src/util/StringSplit.hxx b/src/util/StringSplit.hxx index 3a9c611d2..8ff1849e1 100644 --- a/src/util/StringSplit.hxx +++ b/src/util/StringSplit.hxx @@ -47,7 +47,7 @@ constexpr std::pair, std::basic_string_view> Partition(const std::basic_string_view haystack, const typename std::basic_string_view::const_pointer position) noexcept { - return Partition(haystack, std::distance(haystack.data(), position)); + return Partition(haystack, position - haystack.data()); } template