mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-12 07:50:59 +00:00
Fixed move constructor in generated union class (#4192)
* Fixed move constructor in generated union class * Removed delegating constructor
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
695d26183a
commit
17c5f89d4f
@@ -104,7 +104,8 @@ struct AnyUnion {
|
||||
|
||||
AnyUnion() : type(Any_NONE), table(nullptr) {}
|
||||
AnyUnion(AnyUnion&& u):
|
||||
type(std::move(u.type)), table(std::move(u.table)) {}
|
||||
type(Any_NONE), table(nullptr)
|
||||
{ std::swap(type, u.type); std::swap(table, u.table); }
|
||||
AnyUnion(const AnyUnion &);
|
||||
AnyUnion &operator=(const AnyUnion &);
|
||||
~AnyUnion() { Reset(); }
|
||||
|
||||
Reference in New Issue
Block a user