mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-28 11:31:57 +01:00
add free inline swap functions
This commit is contained in:
@@ -272,6 +272,12 @@ TEST(Value, Swap) {
|
||||
EXPECT_TRUE(v1.IsObject());
|
||||
EXPECT_TRUE(v2.IsInt());
|
||||
EXPECT_EQ(1234, v2.GetInt());
|
||||
|
||||
// testing std::swap compatibility
|
||||
using std::swap;
|
||||
swap(v1, v2);
|
||||
EXPECT_TRUE(v1.IsInt());
|
||||
EXPECT_TRUE(v2.IsObject());
|
||||
}
|
||||
|
||||
TEST(Value, Null) {
|
||||
|
||||
Reference in New Issue
Block a user