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