diff --git a/src/version_constraint.cpp b/src/version_constraint.cpp index 5452667..ca64ed9 100644 --- a/src/version_constraint.cpp +++ b/src/version_constraint.cpp @@ -45,7 +45,7 @@ inline std::string_view trim(std::string_view s) { auto last = std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) {return !std::isspace(ch);}); // Convert the reverse iter last to the forward iterator containing end using base(). // See: https://en.cppreference.com/w/cpp/iterator/reverse_iterator/base - return std::string_view{first, last.base() - first}; + return std::string_view{first, static_cast(last.base() - first)}; }