Skip to content

Commit

Permalink
Provide default implementation for int_to_string, but allow for overl…
Browse files Browse the repository at this point in the history
…oaded function
  • Loading branch information
crazyjul committed Oct 1, 2019
1 parent 0f073e2 commit 4615f5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/nlohmann/detail/iterators/iteration_proxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ namespace nlohmann
{
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);
}
Expand Down
3 changes: 2 additions & 1 deletion single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3186,7 +3186,8 @@ namespace nlohmann
{
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);
}
Expand Down

0 comments on commit 4615f5a

Please sign in to comment.