Skip to content

Commit af2598c

Browse files
authored
Merge pull request open-source-parsers#751 from open-source-parsers/properly_swappable
Remove std::swap<Json::Value> in favor of ADL
2 parents 3e2b8ea + 1d95628 commit af2598c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

include/json/value.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -880,14 +880,9 @@ class JSON_API ValueIterator : public ValueIteratorBase {
880880
pointer operator->() const { return &deref(); }
881881
};
882882

883-
} // namespace Json
884-
883+
inline void swap(Value& a, Value& b) { a.swap(b); }
885884

886-
namespace std {
887-
/// Specialize std::swap() for Json::Value.
888-
template<>
889-
inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); }
890-
}
885+
} // namespace Json
891886

892887
#pragma pack(pop)
893888

0 commit comments

Comments
 (0)