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