Merge pull request #1989 from adamcalhoon/really-fix-placement-new-alignment
Fix the alignment of placement new buffer for GenericValue.
This commit is contained in:
commit
0d78b1ce93
@ -1235,8 +1235,8 @@ public:
|
||||
// return NullValue;
|
||||
|
||||
// Use static buffer and placement-new to prevent destruction
|
||||
static char buffer[sizeof(GenericValue)];
|
||||
return *new (buffer) GenericValue();
|
||||
static GenericValue buffer;
|
||||
return *new (reinterpret_cast<char *>(&buffer)) GenericValue();
|
||||
}
|
||||
}
|
||||
template <typename SourceAllocator>
|
||||
|
Loading…
x
Reference in New Issue
Block a user