Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
a1dbfcd7
Unverified
Commit
a1dbfcd7
authored
Jul 25, 2020
by
Niels Lohmann
Committed by
GitHub
Jul 25, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2306 from jwittbrodt/develop
added inline to NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE macro
parents
448ceb2e
c00c3162
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
macro_scope.hpp
include/nlohmann/detail/macro_scope.hpp
+2
-2
json.hpp
single_include/nlohmann/json.hpp
+3
-3
No files found.
include/nlohmann/detail/macro_scope.hpp
View file @
a1dbfcd7
...
@@ -282,8 +282,8 @@
...
@@ -282,8 +282,8 @@
@since version 3.9.0
@since version 3.9.0
*/
*/
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \
void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
inline
void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
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__)) }
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
#define JSON_USE_IMPLICIT_CONVERSIONS 1
#define JSON_USE_IMPLICIT_CONVERSIONS 1
...
...
single_include/nlohmann/json.hpp
View file @
a1dbfcd7
...
@@ -2299,8 +2299,8 @@ JSON_HEDLEY_DIAGNOSTIC_POP
...
@@ -2299,8 +2299,8 @@ JSON_HEDLEY_DIAGNOSTIC_POP
@since version 3.9.0
@since version 3.9.0
*/
*/
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \
void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
inline
void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
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__)) }
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
#define JSON_USE_IMPLICIT_CONVERSIONS 1
#define JSON_USE_IMPLICIT_CONVERSIONS 1
...
@@ -25043,7 +25043,7 @@ template<>
...
@@ -25043,7 +25043,7 @@ template<>
inline
void
swap
<
nlohmann
::
json
>
(
nlohmann
::
json
&
j1
,
nlohmann
::
json
&
j2
)
noexcept
(
inline
void
swap
<
nlohmann
::
json
>
(
nlohmann
::
json
&
j1
,
nlohmann
::
json
&
j2
)
noexcept
(
is_nothrow_move_constructible
<
nlohmann
::
json
>::
value
&&
is_nothrow_move_constructible
<
nlohmann
::
json
>::
value
&&
is_nothrow_move_assignable
<
nlohmann
::
json
>::
value
is_nothrow_move_assignable
<
nlohmann
::
json
>::
value
)
)
{
{
j1
.
swap
(
j2
);
j1
.
swap
(
j2
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment