diff options
Diffstat (limited to 'include/rapidjson/document.h')
-rw-r--r-- | include/rapidjson/document.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index e2cc6000..92794744 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -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 GenericValid buffer; + return *new (reinterpret_cast<char *>(&buffer)) GenericValue(); } } template <typename SourceAllocator> |