Commit 4615f5a9 by Julien Hamaide

Provide default implementation for int_to_string, but allow for overloaded function

parent 0f073e26
...@@ -12,7 +12,8 @@ namespace nlohmann ...@@ -12,7 +12,8 @@ namespace nlohmann
{ {
namespace detail namespace detail
{ {
void int_to_string( std::string& target, int value ) template<typename string_type>
void int_to_string( string_type& target, int value )
{ {
target = std::to_string(value); target = std::to_string(value);
} }
......
...@@ -3186,7 +3186,8 @@ namespace nlohmann ...@@ -3186,7 +3186,8 @@ namespace nlohmann
{ {
namespace detail namespace detail
{ {
void int_to_string( std::string& target, int value ) template<typename string_type>
void int_to_string( string_type& target, int value )
{ {
target = std::to_string(value); target = std::to_string(value);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment