Use new "data" member char array in aligned_storage::type for placement new, to avoid breaking strict aliasing.

This commit is contained in:
Ion Gaztañaga committed 2018-01-30 14:20:52 +01:00
1 parent 9137957672
commit f0736ba73a
6 files changed
+16 -16

No files matched your search

+2 -2
View File
@@ -51,10 +51,10 @@ class static_storage_allocator
{ return *this; }
BOOST_CONTAINER_FORCEINLINE T* internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_cast<T*>(static_cast<const T*>(static_cast<const void*>(&storage))); }
{ return const_cast<T*>(static_cast<const T*>(static_cast<const void*>(storage.data))); }
BOOST_CONTAINER_FORCEINLINE T* internal_storage() BOOST_NOEXCEPT_OR_NOTHROW
{ return static_cast<T*>(static_cast<void*>(&storage)); }
{ return static_cast<T*>(static_cast<void*>(storage.data)); }
static const std::size_t internal_capacity = N;