Merge pull request #751 from open-source-parsers/properly_swappable

Remove std::swap<Json::Value> in favor of ADL
This commit is contained in:
Christopher Dunn 2018-03-06 17:14:24 -06:00 committed by GitHub
commit af2598cdd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -880,15 +880,10 @@ public:
pointer operator->() const { return &deref(); }
};
inline void swap(Value& a, Value& b) { a.swap(b); }
} // namespace Json
namespace std {
/// Specialize std::swap() for Json::Value.
template<>
inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); }
}
#pragma pack(pop)
#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)