nuclear@0: ////////////////////////////////////////////////////////////////////////////// nuclear@0: // nuclear@0: // (C) Copyright Ion Gaztanaga 2005. nuclear@0: // Distributed under the Boost Software License, Version 1.0. nuclear@0: // (See accompanying file LICENSE_1_0.txt or copy at nuclear@0: // http://www.boost.org/LICENSE_1_0.txt) nuclear@0: // nuclear@0: ////////////////////////////////////////////////////////////////////////////// nuclear@0: nuclear@0: #ifndef BOOST_POINTER_CAST_HPP nuclear@0: #define BOOST_POINTER_CAST_HPP nuclear@0: nuclear@0: namespace boost { nuclear@0: nuclear@0: //static_pointer_cast overload for raw pointers nuclear@0: template nuclear@0: inline T* static_pointer_cast(U *ptr) nuclear@0: { nuclear@0: return static_cast(ptr); nuclear@0: } nuclear@0: nuclear@0: //dynamic_pointer_cast overload for raw pointers nuclear@0: template nuclear@0: inline T* dynamic_pointer_cast(U *ptr) nuclear@0: { nuclear@0: return dynamic_cast(ptr); nuclear@0: } nuclear@0: nuclear@0: //const_pointer_cast overload for raw pointers nuclear@0: template nuclear@0: inline T* const_pointer_cast(U *ptr) nuclear@0: { nuclear@0: return const_cast(ptr); nuclear@0: } nuclear@0: nuclear@0: //reinterpret_pointer_cast overload for raw pointers nuclear@0: template nuclear@0: inline T* reinterpret_pointer_cast(U *ptr) nuclear@0: { nuclear@0: return reinterpret_cast(ptr); nuclear@0: } nuclear@0: nuclear@0: } // namespace boost nuclear@0: nuclear@0: #endif //BOOST_POINTER_CAST_HPP