Add move constructor to generated union class. (#4167)

* Add move constructor to generated union class.

* Unused default

* Add generated code
This commit is contained in:
水樹素子
2017-02-11 03:32:34 +09:00
committed by Wouter van Oortmerssen
parent c7c4bbfce2
commit b7bfecb4ee
3 changed files with 6 additions and 0 deletions

View File

@@ -103,6 +103,8 @@ struct AnyUnion {
flatbuffers::NativeTable *table;
AnyUnion() : type(Any_NONE), table(nullptr) {}
AnyUnion(AnyUnion&& u):
type(std::move(u.type)), table(std::move(u.table)) {}
AnyUnion(const AnyUnion &);
AnyUnion &operator=(const AnyUnion &);
~AnyUnion() { Reset(); }