+ implemented member and non-member swap

This commit is contained in:
Niels 2015-01-19 19:51:07 +01:00
parent 7724d34741
commit a144800774
4 changed files with 154 additions and 4 deletions

View file

@ -1268,6 +1268,12 @@ void json::clear() noexcept
}
}
void json::swap(json& o) noexcept
{
std::swap(type_, o.type_);
std::swap(value_, o.value_);
}
json::value_type json::type() const noexcept
{
return type_;