1 //////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // See http://www.boost.org/libs/container for documentation.
9 //////////////////////////////////////////////////////////////////////////////
10 #ifndef BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP
11 #define BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP
13 #ifndef BOOST_CONFIG_HPP
14 # include <boost/config.hpp>
17 #if defined(BOOST_HAS_PRAGMA_ONCE)
25 namespace container_detail {
28 BOOST_CONTAINER_FORCEINLINE T* addressof(T& obj)
30 return static_cast<T*>(
33 &reinterpret_cast<const volatile char&>(obj)
37 } //namespace container_detail {
38 } //namespace container {
41 #endif //#ifndef BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP