Specialize std::swap() for Json::Value in a C++ standard compliant way

originally from pull #119
This commit is contained in:
datadiode 2015-01-20 15:25:04 -06:00 committed by Christopher Dunn
parent 46a925ba4a
commit 9454e687a3

View File

@ -1082,6 +1082,14 @@ public:
} // namespace Json
namespace std {
/// Specialize std::swap() for Json::Value.
template<>
inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); }
}
#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
#pragma warning(pop)
#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)