Chris@102: ////////////////////////////////////////////////////////////////////////////// Chris@102: // Chris@102: // (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost Chris@102: // Software License, Version 1.0. (See accompanying file Chris@102: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@102: // Chris@102: // See http://www.boost.org/libs/container for documentation. Chris@102: // Chris@102: ////////////////////////////////////////////////////////////////////////////// Chris@102: #ifndef BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP Chris@102: #define BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP Chris@102: Chris@102: #ifndef BOOST_CONFIG_HPP Chris@102: # include Chris@102: #endif Chris@102: Chris@102: #if defined(BOOST_HAS_PRAGMA_ONCE) Chris@102: # pragma once Chris@102: #endif Chris@102: Chris@102: #include Chris@102: Chris@102: namespace boost { Chris@102: namespace container { Chris@102: namespace container_detail { Chris@102: Chris@102: template Chris@102: inline T* addressof(T& obj) Chris@102: { Chris@102: return static_cast( Chris@102: static_cast( Chris@102: const_cast( Chris@102: &reinterpret_cast(obj) Chris@102: ))); Chris@102: } Chris@102: Chris@102: } //namespace container_detail { Chris@102: } //namespace container { Chris@102: } //namespace boost { Chris@102: Chris@102: #endif //#ifndef BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP