From 691fb0c57a142889f788c72e8b7d64548cb5b06c Mon Sep 17 00:00:00 2001
From: chenguoping <chenguopingdota@163.com>
Date: Tue, 16 Jun 2020 15:35:26 +0800
Subject: [PATCH] fix issue#2059

---
 include/nlohmann/detail/iterators/iteration_proxy.hpp | 3 ++-
 single_include/nlohmann/json.hpp                      | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/nlohmann/detail/iterators/iteration_proxy.hpp b/include/nlohmann/detail/iterators/iteration_proxy.hpp
index c61d9629..48927b01 100644
--- a/include/nlohmann/detail/iterators/iteration_proxy.hpp
+++ b/include/nlohmann/detail/iterators/iteration_proxy.hpp
@@ -12,7 +12,8 @@ namespace nlohmann
 {
 namespace detail
 {
-template<typename string_type>
+template<typename string_type, typename std::enable_if<
+             std::is_same<char, typename string_type::value_type>::value, int>::type = 0>
 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 cc822a54..69a4ec09 100644
--- a/single_include/nlohmann/json.hpp
+++ b/single_include/nlohmann/json.hpp
@@ -3650,7 +3650,8 @@ namespace nlohmann
 {
 namespace detail
 {
-template<typename string_type>
+template<typename string_type, typename std::enable_if<
+             std::is_same<char, typename string_type::value_type>::value, int>::type = 0>
 void int_to_string( string_type& target, std::size_t value )
 {
     target = std::to_string(value);