123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #ifndef BOOST_POINTER_CAST_HPP
- #define BOOST_POINTER_CAST_HPP
- namespace boost {
- template<class T, class U>
- inline T* static_pointer_cast(U *ptr)
- {
- return static_cast<T*>(ptr);
- }
- template<class T, class U>
- inline T* dynamic_pointer_cast(U *ptr)
- {
- return dynamic_cast<T*>(ptr);
- }
- template<class T, class U>
- inline T* const_pointer_cast(U *ptr)
- {
- return const_cast<T*>(ptr);
- }
- template<class T, class U>
- inline T* reinterpret_pointer_cast(U *ptr)
- {
- return reinterpret_cast<T*>(ptr);
- }
- }
- #endif
|