commit 06f52fa: [Minor] One more compatibility fix

Vsevolod Stakhov vsevolod at rspamd.com
Mon Jul 3 22:07:03 UTC 2023


Author: Vsevolod Stakhov
Date: 2023-07-03 23:00:12 +0100
URL: https://github.com/rspamd/rspamd/commit/06f52fae3a0e57ee8d01aaa974139f3b31bf296c (HEAD -> master)

[Minor] One more compatibility fix

---
 src/libutil/cxx/util.hxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libutil/cxx/util.hxx b/src/libutil/cxx/util.hxx
index df8d99b6c..2d009c6cd 100644
--- a/src/libutil/cxx/util.hxx
+++ b/src/libutil/cxx/util.hxx
@@ -105,7 +105,7 @@ inline auto string_split_on(const S &input, std::string_view::value_type chr) ->
 		while (*pos == chr && pos != input.end()) {
 			++pos;
 		}
-		auto last = std::string_view{pos, std::end(input)};
+		auto last = std::string_view{pos,  static_cast<std::size_t>(std::distance(pos, std::end(input)))};
 
 		return {first, last};
 	}


More information about the Commits mailing list