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
2018-01-30 14:20:52 +01:00
parent 9137957672
commit f0736ba73a
6 changed files with 16 additions and 16 deletions

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;