Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
4d780b09
Commit
4d780b09
authored
7 years ago
by
David Guthrie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reordered the code. It seems to stop clang 3.4.2 in RHEL 7 from crashing intermittently.
parent
99939d63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
26 deletions
+28
-26
include/nlohmann/json.hpp
include/nlohmann/json.hpp
+14
-13
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+14
-13
No files found.
include/nlohmann/json.hpp
View file @
4d780b09
...
...
@@ -7691,19 +7691,6 @@ class basic_json
// specialization of std::swap, and std::hash
namespace
std
{
/*!
@brief exchanges the values of two JSON objects
@since version 1.0.0
*/
template
<
>
inline
void
swap
<
nlohmann
::
json
>
(
nlohmann
::
json
&
j1
,
nlohmann
::
json
&
j2
)
noexcept
(
is_nothrow_move_constructible
<
nlohmann
::
json
>::
value
and
is_nothrow_move_assignable
<
nlohmann
::
json
>::
value
)
{
j1
.
swap
(
j2
);
}
/// hash value for JSON objects
template
<
>
...
...
@@ -7739,6 +7726,20 @@ struct less< ::nlohmann::detail::value_t>
}
};
/*!
@brief exchanges the values of two JSON objects
@since version 1.0.0
*/
template
<
>
inline
void
swap
<
nlohmann
::
json
>
(
nlohmann
::
json
&
j1
,
nlohmann
::
json
&
j2
)
noexcept
(
is_nothrow_move_constructible
<
nlohmann
::
json
>::
value
and
is_nothrow_move_assignable
<
nlohmann
::
json
>::
value
)
{
j1
.
swap
(
j2
);
}
}
// namespace std
/*!
...
...
This diff is collapsed.
Click to expand it.
single_include/nlohmann/json.hpp
View file @
4d780b09
...
...
@@ -18764,19 +18764,6 @@ class basic_json
// specialization of std::swap, and std::hash
namespace std
{
/*!
@brief exchanges the values of two JSON objects
@since version 1.0.0
*/
template<>
inline void swap<nlohmann::json>(nlohmann::json& j1, nlohmann::json& j2) noexcept(
is_nothrow_move_constructible<nlohmann::json>::value and
is_nothrow_move_assignable<nlohmann::json>::value
)
{
j1.swap(j2);
}
/// hash value for JSON objects
template<>
...
...
@@ -18812,6 +18799,20 @@ struct less< ::nlohmann::detail::value_t>
}
};
/*!
@brief exchanges the values of two JSON objects
@since version 1.0.0
*/
template<>
inline void swap<nlohmann::json>(nlohmann::json& j1, nlohmann::json& j2) noexcept(
is_nothrow_move_constructible<nlohmann::json>::value and
is_nothrow_move_assignable<nlohmann::json>::value
)
{
j1.swap(j2);
}
} // namespace std
/*!
...
...
This diff is collapsed.
Click to expand it.
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