Two new macroses NLOHMANN_DEFINE_TYPE_INTRUSIVE_2 and NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_2 are renamed to *_T. Also doxygen docs for them are improved
This commit is contained in:
parent
985d3ea852
commit
8d7c38efb1
@ -293,20 +293,20 @@
|
||||
inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
|
||||
|
||||
/*!
|
||||
@brief macro
|
||||
@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_2
|
||||
@brief macro to briefly define intrusive serialization of a given type to/from any basic_json object
|
||||
@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_T
|
||||
@since version 3.9.2
|
||||
*/
|
||||
#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_2(Type, ...) \
|
||||
#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_T(Type, ...) \
|
||||
template<typename BasicJsonType> friend void to_json(JsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
|
||||
template<typename BasicJsonType> friend void from_json(const JsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
|
||||
|
||||
/*!
|
||||
@brief macro
|
||||
@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_2
|
||||
@brief macro to briefly define non-intrusive serialization of a given type to/from any basic_json object
|
||||
@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_T
|
||||
@since version 3.9.2
|
||||
*/
|
||||
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_2(Type, ...) \
|
||||
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_T(Type, ...) \
|
||||
template<typename BasicJsonType> void to_json(JsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
|
||||
template<typename BasicJsonType> void from_json(const JsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
|
||||
|
||||
|
||||
@ -2370,20 +2370,20 @@ JSON_HEDLEY_DIAGNOSTIC_POP
|
||||
inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
|
||||
|
||||
/*!
|
||||
@brief macro
|
||||
@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_2
|
||||
@brief macro to briefly define intrusive serialization of a given type to/from any basic_json object
|
||||
@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_T
|
||||
@since version 3.9.2
|
||||
*/
|
||||
#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_2(Type, ...) \
|
||||
#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_T(Type, ...) \
|
||||
template<typename BasicJsonType> friend void to_json(JsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
|
||||
template<typename BasicJsonType> friend void from_json(const JsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
|
||||
|
||||
/*!
|
||||
@brief macro
|
||||
@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_2
|
||||
@brief macro to briefly define non-intrusive serialization of a given type to/from any basic_json object
|
||||
@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_T
|
||||
@since version 3.9.2
|
||||
*/
|
||||
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_2(Type, ...) \
|
||||
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_T(Type, ...) \
|
||||
template<typename BasicJsonType> void to_json(JsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
|
||||
template<typename BasicJsonType> void from_json(const JsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user