Skip to content
Snippets Groups Projects
Commit 7400100d authored by Yuri Kunde Schlesner's avatar Yuri Kunde Schlesner
Browse files

Merge pull request #1392 from lioncash/move

backend: defaulted move constructor/assignment
parents 7497675a c89e3d59
No related branches found
No related tags found
No related merge requests found
......@@ -27,25 +27,9 @@ struct Entry {
std::string message;
Entry() = default;
Entry(Entry&& o) = default;
// TODO(yuriks) Use defaulted move constructors once MSVC supports them
#define MOVE(member) member(std::move(o.member))
Entry(Entry&& o)
: MOVE(timestamp), MOVE(log_class), MOVE(log_level),
MOVE(location), MOVE(message)
{}
#undef MOVE
Entry& operator=(const Entry&& o) {
#define MOVE(member) member = std::move(o.member)
MOVE(timestamp);
MOVE(log_class);
MOVE(log_level);
MOVE(location);
MOVE(message);
#undef MOVE
return *this;
}
Entry& operator=(Entry&& o) = default;
};
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment