From: Vsevolod Stakhov Date: Sun, 2 Jul 2023 16:39:07 +0000 (+0100) Subject: [Minor] Try to be more compatible X-Git-Tag: 3.6~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4041045abc00aa8f8c0ae211b0bf1648ce44029d;p=thirdparty%2Frspamd.git [Minor] Try to be more compatible --- diff --git a/src/libutil/cxx/util.hxx b/src/libutil/cxx/util.hxx index dd8ef0ee65..df8d99b6c6 100644 --- a/src/libutil/cxx/util.hxx +++ b/src/libutil/cxx/util.hxx @@ -101,7 +101,7 @@ inline auto string_split_on(const S &input, std::string_view::value_type chr) -> auto pos = std::find(std::begin(input), std::end(input), chr); if (pos != input.end()) { - auto first = std::string_view{std::begin(input), pos}; + auto first = std::string_view{std::begin(input), static_cast(std::distance(std::begin(input), pos))}; while (*pos == chr && pos != input.end()) { ++pos; }