Skip to content

Commit

Permalink
feat: add declare for serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Oct 20, 2023
1 parent ae7d044 commit 7c6b10a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions include/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,15 @@ namespace literals
template <typename string_t = default_string_t>
const basic_value<string_t> invalid_value();

namespace _serialization_helper
{
template <typename>
class streamer;
}
template <bool stream, typename any_t, typename string_t = default_string_t,
typename streamer_t = _serialization_helper::string_streamer<string_t>>
basic_value<string_t> serialize(any_t&& arg, streamer_t&& streamer = streamer_t());

// ******************************
// * basic_value impl *
// ******************************
Expand Down Expand Up @@ -2592,9 +2601,8 @@ namespace _serialization_helper
}
}

template <bool stream, typename any_t, typename string_t = default_string_t,
typename streamer_t = _serialization_helper::string_streamer<string_t>>
MEOJSON_INLINE basic_value<string_t> serialize(any_t&& arg, streamer_t&& streamer = streamer_t())
template <bool stream, typename any_t, typename string_t, typename streamer_t>
MEOJSON_INLINE basic_value<string_t> serialize(any_t&& arg, streamer_t&& streamer)
{
using namespace _serialization_helper;

Expand Down

0 comments on commit 7c6b10a

Please sign in to comment.