mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-21 03:17:32 +00:00
VS fix for ambiguous union assignment operator.
Change-Id: I1c37db1ced462fd558d3e893a501341f3eca6379
This commit is contained in:
@@ -109,8 +109,8 @@ struct AnyUnion {
|
||||
type(Any_NONE), value(nullptr)
|
||||
{ std::swap(type, u.type); std::swap(value, u.value); }
|
||||
AnyUnion(const AnyUnion &) FLATBUFFERS_NOEXCEPT;
|
||||
AnyUnion &operator=(AnyUnion u) FLATBUFFERS_NOEXCEPT
|
||||
{ std::swap(type, u.type); std::swap(value, u.value); return *this; }
|
||||
AnyUnion &operator=(const AnyUnion &u) FLATBUFFERS_NOEXCEPT
|
||||
{ AnyUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; }
|
||||
AnyUnion &operator=(AnyUnion &&u) FLATBUFFERS_NOEXCEPT
|
||||
{ std::swap(type, u.type); std::swap(value, u.value); return *this; }
|
||||
~AnyUnion() { Reset(); }
|
||||
|
||||
@@ -56,8 +56,8 @@ struct CharacterUnion {
|
||||
type(Character_NONE), value(nullptr)
|
||||
{ std::swap(type, u.type); std::swap(value, u.value); }
|
||||
CharacterUnion(const CharacterUnion &) FLATBUFFERS_NOEXCEPT;
|
||||
CharacterUnion &operator=(CharacterUnion u) FLATBUFFERS_NOEXCEPT
|
||||
{ std::swap(type, u.type); std::swap(value, u.value); return *this; }
|
||||
CharacterUnion &operator=(const CharacterUnion &u) FLATBUFFERS_NOEXCEPT
|
||||
{ CharacterUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; }
|
||||
CharacterUnion &operator=(CharacterUnion &&u) FLATBUFFERS_NOEXCEPT
|
||||
{ std::swap(type, u.type); std::swap(value, u.value); return *this; }
|
||||
~CharacterUnion() { Reset(); }
|
||||
|
||||
Reference in New Issue
Block a user