1
0
mirror of https://github.com/nlohmann/json.git synced 2026-07-21 19:23:03 +04:00

♻️ allow patch and diff to be used with arbitrary string types (#4536)

This commit is contained in:
Niels Lohmann
2024-12-13 07:24:50 +01:00
committed by GitHub
parent e6cafa573a
commit 620034ecec
5 changed files with 150 additions and 45 deletions
@@ -10,7 +10,6 @@
#include <cstddef> // size_t
#include <iterator> // forward_iterator_tag
#include <string> // string, to_string
#include <tuple> // tuple_size, get, tuple_element
#include <utility> // move
@@ -20,19 +19,13 @@
#include <nlohmann/detail/abi_macros.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
#include <nlohmann/detail/string_utils.hpp>
#include <nlohmann/detail/value_t.hpp>
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
template<typename string_type>
void int_to_string( string_type& target, std::size_t value )
{
// For ADL
using std::to_string;
target = to_string(value);
}
template<typename IteratorType> class iteration_proxy_value
{
public: