make SerializerType template arg
This commit is contained in:
parent
e5275e30ef
commit
402da49c64
@ -133,12 +133,13 @@
|
||||
template<typename> class AllocatorType, \
|
||||
template<typename, typename = void> class JSONSerializer, \
|
||||
class BinaryType, \
|
||||
template<typename, typename> class LexerType>
|
||||
template<typename, typename> class LexerType, \
|
||||
template<typename> class SerializerType>
|
||||
|
||||
#define NLOHMANN_BASIC_JSON_TPL \
|
||||
basic_json<ObjectType, ArrayType, StringType, BooleanType, \
|
||||
NumberIntegerType, NumberUnsignedType, NumberFloatType, \
|
||||
AllocatorType, JSONSerializer, BinaryType, LexerType>
|
||||
AllocatorType, JSONSerializer, BinaryType, LexerType, SerializerType>
|
||||
|
||||
// Macros to simplify conversion from/to types
|
||||
|
||||
|
||||
@ -231,7 +231,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
template<typename CharType> using binary_writer = ::nlohmann::detail::binary_writer<basic_json, CharType>;
|
||||
|
||||
JSON_PRIVATE_UNLESS_TESTED:
|
||||
using serializer = ::nlohmann::detail::serializer<basic_json>;
|
||||
// using serializer = ::nlohmann::detail::serializer<basic_json>;
|
||||
using serializer = SerializerType<basic_json>;
|
||||
|
||||
public:
|
||||
using value_t = detail::value_t;
|
||||
|
||||
@ -28,6 +28,9 @@ namespace detail
|
||||
{
|
||||
template<typename BasicJsonType, typename InputAdapterType>
|
||||
class lexer;
|
||||
|
||||
template<typename BasicJsonType>
|
||||
class serializer;
|
||||
}
|
||||
|
||||
template<template<typename U, typename V, typename... Args> class ObjectType =
|
||||
@ -41,7 +44,8 @@ template<template<typename U, typename V, typename... Args> class ObjectType =
|
||||
template<typename T, typename SFINAE = void> class JSONSerializer =
|
||||
adl_serializer,
|
||||
class BinaryType = std::vector<std::uint8_t>,
|
||||
template<typename BasicJsonType, typename InputAdapterType> class LexerType = detail::lexer>
|
||||
template<typename BasicJsonType, typename InputAdapterType> class LexerType = detail::lexer,
|
||||
template<typename BasicJsonType> class SerializerType = detail::serializer>
|
||||
class basic_json;
|
||||
|
||||
/*!
|
||||
|
||||
Loading…
Reference in New Issue
Block a user