fix issue#2059

This commit is contained in:
chenguoping 2020-06-16 15:35:26 +08:00
parent e7452d8778
commit 691fb0c57a
2 changed files with 4 additions and 2 deletions

View file

@ -12,7 +12,8 @@ namespace nlohmann
{ {
namespace detail 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 ) void int_to_string( string_type& target, std::size_t value )
{ {
target = std::to_string(value); target = std::to_string(value);

View file

@ -3650,7 +3650,8 @@ namespace nlohmann
{ {
namespace detail 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 ) void int_to_string( string_type& target, std::size_t value )
{ {
target = std::to_string(value); target = std::to_string(value);