diff --git a/include/nlohmann/detail/iterators/iteration_proxy.hpp b/include/nlohmann/detail/iterators/iteration_proxy.hpp index 8c54746f6..c61d96296 100644 --- a/include/nlohmann/detail/iterators/iteration_proxy.hpp +++ b/include/nlohmann/detail/iterators/iteration_proxy.hpp @@ -13,7 +13,7 @@ namespace nlohmann namespace detail { template -void int_to_string( string_type& target, int value ) +void int_to_string( string_type& target, std::size_t value ) { target = std::to_string(value); } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 10a48c1dd..e680d8b7d 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -3277,7 +3277,7 @@ namespace nlohmann namespace detail { template -void int_to_string( string_type& target, int value ) +void int_to_string( string_type& target, std::size_t value ) { target = std::to_string(value); } diff --git a/test/src/unit-alt-string.cpp b/test/src/unit-alt-string.cpp index 57ddc83a3..51a882179 100644 --- a/test/src/unit-alt-string.cpp +++ b/test/src/unit-alt-string.cpp @@ -154,7 +154,7 @@ class alt_string friend bool ::operator<(const char*, const alt_string&); }; -void int_to_string( alt_string& target, int value ) +void int_to_string( alt_string& target, std::size_t value ) { target = std::to_string(value).c_str(); }