Revert "Fix the alignment of placement new buffer for GenericValue."

This commit is contained in:
Milo Yip 2022-02-09 10:48:05 +08:00 committed by GitHub
parent bf8ca5da88
commit 88bbd87ddd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1235,8 +1235,8 @@ public:
// return NullValue;
// Use static buffer and placement-new to prevent destruction
static GenericValid buffer;
return *new (reinterpret_cast<char *>(&buffer)) GenericValue();
static char buffer[sizeof(GenericValue)];
return *new (buffer) GenericValue();
}
}
template <typename SourceAllocator>