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

+1 -1
View File
@@ -338,7 +338,7 @@ class small_vector_base
pointer internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW
{
return boost::intrusive::pointer_traits<pointer>::pointer_to
(*const_cast<T*>(static_cast<const T*>(static_cast<const void*>(&m_storage_start))));
(*const_cast<T*>(static_cast<const T*>(static_cast<const void*>(m_storage_start.data))));
}
typedef vector<T, small_vector_allocator<SecondaryAllocator> > base_type;