diff --git a/include/nlohmann/ordered_map.hpp b/include/nlohmann/ordered_map.hpp index 43b6ab475..fa20289b2 100644 --- a/include/nlohmann/ordered_map.hpp +++ b/include/nlohmann/ordered_map.hpp @@ -143,7 +143,7 @@ template , // first last // remove the unneeded elements at the end of the vector - Container::resize(this->size() - elements_affected); + Container::resize(static_cast(this->size() - elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 6a155f9f4..244dfa15a 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -17530,7 +17530,7 @@ template , // first last // remove the unneeded elements at the end of the vector - Container::resize(this->size() - elements_affected); + Container::resize(static_cast(this->size() - elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^