epoc32/include/stdapis/boost/pointer_to_other.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/pointer_to_other.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,55 @@
     1.4 +#ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED
     1.5 +#define BOOST_POINTER_TO_OTHER_HPP_INCLUDED
     1.6 +
     1.7 +//
     1.8 +//  pointer_to_other.hpp
     1.9 +//
    1.10 +//  (C) Copyright Ion Gaztaņaga 2005.
    1.11 +//  Copyright (c) 2005 Peter Dimov.
    1.12 +//
    1.13 +//  Distributed under the Boost Software License, Version 1.0.
    1.14 +//
    1.15 +//  (See accompanying file LICENSE_1_0.txt or copy at 
    1.16 +//  http://www.boost.org/LICENSE_1_0.txt)
    1.17 +//
    1.18 +//  See http://www.boost.org/libs/smart_ptr/pointer_to_other.html
    1.19 +//
    1.20 +
    1.21 +namespace boost
    1.22 +{
    1.23 +
    1.24 +// Defines the same pointer type (raw or smart) to another pointee type
    1.25 +
    1.26 +template<class T, class U>
    1.27 +struct pointer_to_other;
    1.28 +
    1.29 +template<class T, class U, 
    1.30 +         template<class> class Sp>
    1.31 +struct pointer_to_other< Sp<T>, U >
    1.32 +{
    1.33 +   typedef Sp<U> type;
    1.34 +};
    1.35 +
    1.36 +template<class T, class T2, class U, 
    1.37 +         template<class, class> class Sp>
    1.38 +struct pointer_to_other< Sp<T, T2>, U >
    1.39 +{
    1.40 +   typedef Sp<U, T2> type;
    1.41 +};
    1.42 +
    1.43 +template<class T, class T2, class T3, class U, 
    1.44 +         template<class, class, class> class Sp>
    1.45 +struct pointer_to_other< Sp<T, T2, T3>, U >
    1.46 +{
    1.47 +   typedef Sp<U, T2, T3> type;
    1.48 +};
    1.49 +
    1.50 +template<class T, class U>
    1.51 +struct pointer_to_other< T*, U >
    1.52 +{
    1.53 +   typedef U* type;
    1.54 +};
    1.55 +
    1.56 +} // namespace boost
    1.57 +
    1.58 +#endif // #ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED