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

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