sl@0: #ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED
sl@0: #define BOOST_POINTER_TO_OTHER_HPP_INCLUDED
sl@0: 
sl@0: //
sl@0: //  pointer_to_other.hpp
sl@0: //
sl@0: //  (C) Copyright Ion GaztaƱaga 2005.
sl@0: //  Copyright (c) 2005 Peter Dimov.
sl@0: //
sl@0: //  Distributed under the Boost Software License, Version 1.0.
sl@0: //
sl@0: //  (See accompanying file LICENSE_1_0.txt or copy at 
sl@0: //  http://www.boost.org/LICENSE_1_0.txt)
sl@0: //
sl@0: //  See http://www.boost.org/libs/smart_ptr/pointer_to_other.html
sl@0: //
sl@0: 
sl@0: namespace boost
sl@0: {
sl@0: 
sl@0: // Defines the same pointer type (raw or smart) to another pointee type
sl@0: 
sl@0: template<class T, class U>
sl@0: struct pointer_to_other;
sl@0: 
sl@0: template<class T, class U, 
sl@0:          template<class> class Sp>
sl@0: struct pointer_to_other< Sp<T>, U >
sl@0: {
sl@0:    typedef Sp<U> type;
sl@0: };
sl@0: 
sl@0: template<class T, class T2, class U, 
sl@0:          template<class, class> class Sp>
sl@0: struct pointer_to_other< Sp<T, T2>, U >
sl@0: {
sl@0:    typedef Sp<U, T2> type;
sl@0: };
sl@0: 
sl@0: template<class T, class T2, class T3, class U, 
sl@0:          template<class, class, class> class Sp>
sl@0: struct pointer_to_other< Sp<T, T2, T3>, U >
sl@0: {
sl@0:    typedef Sp<U, T2, T3> type;
sl@0: };
sl@0: 
sl@0: template<class T, class U>
sl@0: struct pointer_to_other< T*, U >
sl@0: {
sl@0:    typedef U* type;
sl@0: };
sl@0: 
sl@0: } // namespace boost
sl@0: 
sl@0: #endif // #ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED