vrshoot

annotate libs/assimp/boost/pointer_cast.hpp @ 2:334d17aed7de

visual studio project files
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 02 Feb 2014 18:36:38 +0200
parents
children
rev   line source
nuclear@0 1 //////////////////////////////////////////////////////////////////////////////
nuclear@0 2 //
nuclear@0 3 // (C) Copyright Ion Gaztanaga 2005.
nuclear@0 4 // Distributed under the Boost Software License, Version 1.0.
nuclear@0 5 // (See accompanying file LICENSE_1_0.txt or copy at
nuclear@0 6 // http://www.boost.org/LICENSE_1_0.txt)
nuclear@0 7 //
nuclear@0 8 //////////////////////////////////////////////////////////////////////////////
nuclear@0 9
nuclear@0 10 #ifndef BOOST_POINTER_CAST_HPP
nuclear@0 11 #define BOOST_POINTER_CAST_HPP
nuclear@0 12
nuclear@0 13 namespace boost {
nuclear@0 14
nuclear@0 15 //static_pointer_cast overload for raw pointers
nuclear@0 16 template<class T, class U>
nuclear@0 17 inline T* static_pointer_cast(U *ptr)
nuclear@0 18 {
nuclear@0 19 return static_cast<T*>(ptr);
nuclear@0 20 }
nuclear@0 21
nuclear@0 22 //dynamic_pointer_cast overload for raw pointers
nuclear@0 23 template<class T, class U>
nuclear@0 24 inline T* dynamic_pointer_cast(U *ptr)
nuclear@0 25 {
nuclear@0 26 return dynamic_cast<T*>(ptr);
nuclear@0 27 }
nuclear@0 28
nuclear@0 29 //const_pointer_cast overload for raw pointers
nuclear@0 30 template<class T, class U>
nuclear@0 31 inline T* const_pointer_cast(U *ptr)
nuclear@0 32 {
nuclear@0 33 return const_cast<T*>(ptr);
nuclear@0 34 }
nuclear@0 35
nuclear@0 36 //reinterpret_pointer_cast overload for raw pointers
nuclear@0 37 template<class T, class U>
nuclear@0 38 inline T* reinterpret_pointer_cast(U *ptr)
nuclear@0 39 {
nuclear@0 40 return reinterpret_cast<T*>(ptr);
nuclear@0 41 }
nuclear@0 42
nuclear@0 43 } // namespace boost
nuclear@0 44
nuclear@0 45 #endif //BOOST_POINTER_CAST_HPP