mirror of
https://github.com/nlohmann/json.git
synced 2025-07-24 02:21:01 +03:00
Reordered the code. It seems to stop clang 3.4.2 in RHEL 7 from crashing intermittently.
This commit is contained in:
@ -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
|
||||
|
||||
/*!
|
||||
|
Reference in New Issue
Block a user