Skip to content

Commit 635b9a0

Browse files
authored
Merge pull request #2193 from dota17/issue#2059
Fix consistency in function `int_to_string()`
2 parents 8575fdf + 0ecf297 commit 635b9a0

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

include/nlohmann/detail/iterators/iteration_proxy.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ namespace detail
1515
template<typename string_type>
1616
void int_to_string( string_type& target, std::size_t value )
1717
{
18-
target = std::to_string(value);
18+
// For ADL
19+
using std::to_string;
20+
target = to_string(value);
1921
}
2022
template <typename IteratorType> class iteration_proxy_value
2123
{

single_include/nlohmann/json.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3657,7 +3657,9 @@ namespace detail
36573657
template<typename string_type>
36583658
void int_to_string( string_type& target, std::size_t value )
36593659
{
3660-
target = std::to_string(value);
3660+
// For ADL
3661+
using std::to_string;
3662+
target = to_string(value);
36613663
}
36623664
template <typename IteratorType> class iteration_proxy_value
36633665
{

0 commit comments

Comments
 (0)