Fix -Wcast-align warning

This commit is contained in:
Ion Gaztañaga
2021-12-30 12:50:35 +01:00
parent 0a726b236c
commit 478b6fd2d5

View File

@@ -115,7 +115,7 @@ class heap_allocator_v1
{
(void)hint;
char *raw_mem = ::new char[sizeof(value_type)*count];
return boost::intrusive::pointer_traits<pointer>::pointer_to(reinterpret_cast<value_type &>(*raw_mem));
return boost::intrusive::pointer_traits<pointer>::pointer_to(*reinterpret_cast<value_type *>((void*)raw_mem));
}
//!Deallocates memory previously allocated. Never throws