Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/pointer_to_other.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED
0002 #define BOOST_POINTER_TO_OTHER_HPP_INCLUDED
0003 
0004 //
0005 //  pointer_to_other.hpp
0006 //
0007 //  (C) Copyright Ion Gaztanaga 2005.
0008 //  Copyright (c) 2005 Peter Dimov.
0009 //
0010 //  Distributed under the Boost Software License, Version 1.0.
0011 //
0012 //  (See accompanying file LICENSE_1_0.txt or copy at 
0013 //  http://www.boost.org/LICENSE_1_0.txt)
0014 //
0015 //  See http://www.boost.org/libs/smart_ptr/ for documentation.
0016 //
0017 
0018 namespace boost
0019 {
0020 
0021 // Defines the same pointer type (raw or smart) to another pointee type
0022 
0023 template<class T, class U>
0024 struct pointer_to_other;
0025 
0026 template<class T, class U, 
0027          template<class> class Sp>
0028 struct pointer_to_other< Sp<T>, U >
0029 {
0030    typedef Sp<U> type;
0031 };
0032 
0033 template<class T, class T2, class U, 
0034          template<class, class> class Sp>
0035 struct pointer_to_other< Sp<T, T2>, U >
0036 {
0037    typedef Sp<U, T2> type;
0038 };
0039 
0040 template<class T, class T2, class T3, class U, 
0041          template<class, class, class> class Sp>
0042 struct pointer_to_other< Sp<T, T2, T3>, U >
0043 {
0044    typedef Sp<U, T2, T3> type;
0045 };
0046 
0047 template<class T, class U>
0048 struct pointer_to_other< T*, U >
0049 {
0050    typedef U* type;
0051 };
0052 
0053 } // namespace boost
0054 
0055 #endif // #ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED