forked from boostorg/intrusive
Changes to support -Wcast-align=strict
This commit is contained in:
@@ -3888,6 +3888,7 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std
|
||||
|
||||
[section:release_notes_boost_1_79_00 Boost 1.79 Release]
|
||||
|
||||
* The library now compiles without warnings with GCC's -Wcast-align=strict
|
||||
* Fixed bugs:
|
||||
* [@https://github.com/boostorg/intrusive/pull/66 GitHub #66: ['Fix declaration of node shadowing member]]
|
||||
* [@https://github.com/boostorg/intrusive/pull/70 GitHub #70: ['list: fix remove / remove_and_dispose]]
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <boost/move/detail/placement_new.hpp>
|
||||
#include <boost/move/detail/force_ptr.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
@@ -63,7 +64,7 @@ class array_initializer
|
||||
BOOST_CATCH(...){
|
||||
while(i--){
|
||||
init_buf -= sizeof(T);
|
||||
((T*)init_buf)->~T();
|
||||
move_detail::force_ptr<T*>(init_buf)->~T();
|
||||
}
|
||||
BOOST_RETHROW;
|
||||
}
|
||||
@@ -81,7 +82,7 @@ class array_initializer
|
||||
char *init_buf = (char*)rawbuf + N*sizeof(T);
|
||||
for(std::size_t i = 0; i != N; ++i){
|
||||
init_buf -= sizeof(T);
|
||||
((T*)init_buf)->~T();
|
||||
move_detail::force_ptr<T*>(init_buf)->~T();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user