mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1339652
- Delete UnionMember's copy constructor, because it can't safely be used in the C++ object model. r=bz
--HG-- extra : rebase_source : fff9dc6738c4929f8e6f32c866f68778875ddab8
This commit is contained in:
parent
8f8272ae04
commit
a80694a3cb
@ -21,7 +21,14 @@ class UnionMember
|
||||
{
|
||||
AlignedStorage2<T> mStorage;
|
||||
|
||||
// Copy construction can't be supported because C++ requires that any enclosed
|
||||
// T be initialized in a way C++ knows about -- that is, by |new| or similar.
|
||||
UnionMember(const UnionMember&) = delete;
|
||||
|
||||
public:
|
||||
UnionMember() = default;
|
||||
~UnionMember() = default;
|
||||
|
||||
T& SetValue()
|
||||
{
|
||||
new (mStorage.addr()) T();
|
||||
|
Loading…
Reference in New Issue
Block a user