///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2006-2014 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// #ifndef BOOST_INTRUSIVE_DETAIL_UNCAST_HPP #define BOOST_INTRUSIVE_DETAIL_UNCAST_HPP #if defined(_MSC_VER) # pragma once #endif #include #include #include namespace boost { namespace intrusive { namespace detail { template struct uncast_types { typedef typename pointer_traits::element_type element_type; typedef typename remove_const::type non_const_type; typedef typename pointer_traits:: template rebind_pointer::type non_const_pointer; typedef pointer_traits non_const_traits; }; template static typename uncast_types::non_const_pointer uncast(const ConstNodePtr & ptr) { return uncast_types::non_const_traits::const_cast_from(ptr); } } //namespace detail { } //namespace intrusive } //namespace boost #include #endif //BOOST_INTRUSIVE_DETAIL_UTILITIES_HPP