Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Oct 20, 2023
1 parent 6cf57da commit ec004f4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions include/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,13 @@ namespace literals
template <typename string_t = default_string_t>
const basic_value<string_t> invalid_value();

namespace _serialization_helper
{
template <bool loose, typename string_t>
struct string_converter;
}
template <bool loose, typename any_t, typename string_t = default_string_t,
typename string_converter_t = serialization_helper::string_converter<loose, string_t>>
typename string_converter_t = _serialization_helper::string_converter<loose, string_t>>
basic_value<string_t> serialize(any_t&& arg, string_converter_t&& string_converter = {});

// ******************************
Expand Down Expand Up @@ -2527,7 +2532,7 @@ MEOJSON_INLINE const basic_value<string_t> invalid_value()
return basic_value<string_t>(basic_value<string_t>::value_type::invalid, typename basic_value<string_t>::var_t());
}

namespace serialization_helper
namespace _serialization_helper
{
template <typename char_t, typename T>
class has_output_operator
Expand Down Expand Up @@ -2566,7 +2571,7 @@ namespace serialization_helper
template <typename T>
constexpr bool is_sequence_container<T> = is_container<T> && !is_associative_container<T>;

template <bool loose, typename string_t = default_string_t>
template <bool loose, typename string_t>
struct string_converter
{
using char_t = typename string_t::value_type;
Expand Down Expand Up @@ -2595,7 +2600,7 @@ namespace serialization_helper
template <bool loose, typename any_t, typename string_t, typename string_converter_t>
MEOJSON_INLINE basic_value<string_t> serialize(any_t&& arg, string_converter_t&& string_converter)
{
using namespace serialization_helper;
using namespace _serialization_helper;

if constexpr (std::is_constructible_v<basic_value<string_t>, any_t>) {
return basic_value<string_t>(std::forward<any_t>(arg));
Expand Down

0 comments on commit ec004f4

Please sign in to comment.