Skip to content

Commit b5d4cbb

Browse files
committed
Running the CI test locally
1 parent 7002b1d commit b5d4cbb

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

single_include/nlohmann/json.hpp

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2607,19 +2607,31 @@ using is_detected_convertible =
26072607
@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_IMPL
26082608
@since version 3.9.2
26092609
*/
2610-
#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_IMPL(BasicJsonType, Type, ...) \
2611-
friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
2612-
friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
2610+
#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_IMPL(BasicJsonType, Type, ...) \
2611+
friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) \
2612+
{ \
2613+
NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) \
2614+
} \
2615+
friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) \
2616+
{ \
2617+
NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) \
2618+
}
26132619

26142620
/*!
26152621
@brief macro to briefly define non-intrusive serialization of a given type to/from JSON
26162622
@note you can define your own specialized macroses like NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE
26172623
@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_IMPL
26182624
@since version 3.9.2
26192625
*/
2620-
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_IMPL(BasicJsonType, Type, ...) \
2621-
inline void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
2622-
inline void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
2626+
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_IMPL(BasicJsonType, Type, ...) \
2627+
inline void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) \
2628+
{ \
2629+
NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) \
2630+
} \
2631+
inline void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) \
2632+
{ \
2633+
NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) \
2634+
}
26232635

26242636
/*!
26252637
@brief macro to briefly define intrusive serialization of given type to/from nlohmann::json
@@ -2699,7 +2711,7 @@ using is_detected_convertible =
26992711
friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) \
27002712
{ \
27012713
NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) \
2702-
} \
2714+
}
27032715

27042716
/*!
27052717
@brief macro to briefly define non-intrusive serialization of a given type to/from any basic_json object

tests/src/unit-udt_macro.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Visibility: \
9797
y == other.y && \
9898
z == other.z; \
9999
} \
100-
Visibility : int a = 0; \
100+
Visibility : int a = 0; \
101101
int b = 0; \
102102
int c = 0; \
103103
int d = 0; \

0 commit comments

Comments
 (0)