diff --git a/include/boost/python/object/value_holder.hpp b/include/boost/python/object/value_holder.hpp index f7ba51bd..b12c6d82 100644 --- a/include/boost/python/object/value_holder.hpp +++ b/include/boost/python/object/value_holder.hpp @@ -29,6 +29,8 @@ # include # include +# include + namespace boost { namespace python { namespace objects { # if BOOST_WORKAROUND(__GNUC__, == 2) @@ -86,12 +88,12 @@ private: // required holder implementation template void* value_holder::holds(type_info dst_t, bool null_ptr_only) { - if (void* wrapped = holds_wrapped(dst_t, &m_held, &m_held)) + if (void* wrapped = holds_wrapped(dst_t, addressof(m_held), addressof(m_held))) return wrapped; type_info src_t = python::type_id(); - return src_t == dst_t ? &m_held - : find_static_type(&m_held, src_t, dst_t); + return src_t == dst_t ? addressof(m_held) + : find_static_type(addressof(m_held), src_t, dst_t); } template @@ -132,7 +134,7 @@ void* value_holder_back_reference::holds( BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_UNFORWARD_LOCAL, nil) ) { - python::detail::initialize_wrapper(self, &this->m_held); + python::detail::initialize_wrapper(self, addressof(this->m_held)); } # undef N