mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-18 12:14:26 +00:00
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:
committed by
Wouter van Oortmerssen
parent
c7c4bbfce2
commit
b7bfecb4ee
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user