Remove std::swap<Json::Value> in favor of ADL

Comply with http://en.cppreference.com/w/cpp/concept/Swappable
Don't open namespace std.
This commit is contained in:
Billy Donahue 2018-03-06 12:51:58 -05:00 committed by GitHub
parent 3e2b8ea9cc
commit 1d95628ba8
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)