mirror of
https://github.com/nlohmann/json.git
synced 2025-07-29 23:01:16 +03:00
Provide default implementation for int_to_string, but allow for overloaded function
This commit is contained in:
@ -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
|
|||||||
{
|
{
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user