Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Commit

Permalink
Move code around. No functional change
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Feb 16, 2019
1 parent ad9c008 commit 8126f0c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mkjson.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ class JSON::Impl {
Impl() noexcept;
};

/*explicit*/ JSON::Impl::Impl(nlohmann::json &&value) noexcept {
std::swap(value, nlohmann_json);
}

JSON::Impl::Impl() noexcept {}

// JSON::Friend is the definition of the class friend of JSON.
class JSON::Friend {
public:
Expand All @@ -178,12 +184,6 @@ class JSON::Friend {
return json.impl->nlohmann_json;
}

/*explicit*/ JSON::Impl::Impl(nlohmann::json &&value) noexcept {
std::swap(value, nlohmann_json);
}

JSON::Impl::Impl() noexcept {}

/*explicit*/ JSON::JSON(Impl &&other_impl) noexcept : JSON{} {
std::swap(other_impl, *impl);
}
Expand Down

0 comments on commit 8126f0c

Please sign in to comment.