Fixes #206 ("operator-> on static_vector::iterator causes cast alignment warning")

This commit is contained in:
Ion Gaztañaga
2021-12-28 15:17:15 +01:00
parent ea3521bf14
commit 3f76f9fdf7
23 changed files with 124 additions and 93 deletions
+3 -3
View File
@@ -34,7 +34,7 @@
#include <boost/move/utility_core.hpp>
#include <boost/move/adl_move_swap.hpp>
#include <boost/move/detail/force_ptr.hpp>
#include <boost/assert.hpp>
#include <memory>
@@ -61,7 +61,7 @@ class simple_allocator
{}
T* allocate(std::size_t n)
{ return (T*)::new char[sizeof(T)*n]; }
{ return move_detail::force_ptr<T*>(::new char[sizeof(T)*n]); }
void deallocate(T*p, std::size_t)
{ delete[] ((char*)p);}
@@ -176,7 +176,7 @@ class propagation_test_allocator
{ unique_id_ = id; }
T* allocate(std::size_t n)
{ return (T*)::new char[sizeof(T)*n]; }
{ return move_detail::force_ptr<T*>(::new char[sizeof(T)*n]); }
void deallocate(T*p, std::size_t)
{ delete[] ((char*)p);}