forked from boostorg/container
Clean force_ptr usage and use launder_cast
This commit is contained in:
1 parent
56cc38f761
commit
978bbb113a
17 files changed
+98
-75
No files matched your search
@@ -31,6 +31,7 @@
|
||||
#include <boost/container/detail/construct_in_place.hpp>
|
||||
#include <boost/container/detail/destroyers.hpp>
|
||||
#include <boost/move/detail/iterator_to_raw_pointer.hpp>
|
||||
#include <boost/move/detail/launder.hpp>
|
||||
#include <boost/container/detail/mpl.hpp>
|
||||
#include <boost/container/detail/placement_new.hpp>
|
||||
#include <boost/move/detail/to_raw_pointer.hpp>
|
||||
@@ -119,16 +120,16 @@ struct base_node
|
||||
}
|
||||
|
||||
inline T &get_data()
|
||||
{ return *move_detail::force_ptr<T*>(this->m_storage.data); }
|
||||
{ return *move_detail::force_ptr<T*>(&this->m_storage); }
|
||||
|
||||
inline const T &get_data() const
|
||||
{ return *move_detail::force_ptr<const T*>(this->m_storage.data); }
|
||||
{ return *move_detail::launder_cast<const T*>(&this->m_storage); }
|
||||
|
||||
inline internal_type &get_real_data()
|
||||
{ return *move_detail::force_ptr<internal_type*>(this->m_storage.data); }
|
||||
{ return *move_detail::launder_cast<internal_type*>(&this->m_storage); }
|
||||
|
||||
inline const internal_type &get_real_data() const
|
||||
{ return *move_detail::force_ptr<const internal_type*>(this->m_storage.data); }
|
||||
{ return *move_detail::launder_cast<const internal_type*>(&this->m_storage); }
|
||||
|
||||
#if defined(BOOST_CONTAINER_DISABLE_ALIASING_WARNING)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
Reference in new issue
Block a user