1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/indirect_reference.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,43 @@
1.4 +#ifndef INDIRECT_REFERENCE_DWA200415_HPP
1.5 +# define INDIRECT_REFERENCE_DWA200415_HPP
1.6 +
1.7 +//
1.8 +// Copyright David Abrahams 2004. Use, modification and distribution is
1.9 +// subject to the Boost Software License, Version 1.0. (See accompanying
1.10 +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
1.11 +//
1.12 +// typename indirect_reference<P>::type provides the type of *p.
1.13 +//
1.14 +// http://www.boost.org/libs/iterator/doc/pointee.html
1.15 +//
1.16 +
1.17 +# include <boost/detail/is_incrementable.hpp>
1.18 +# include <boost/iterator/iterator_traits.hpp>
1.19 +# include <boost/type_traits/remove_cv.hpp>
1.20 +# include <boost/mpl/eval_if.hpp>
1.21 +# include <boost/pointee.hpp>
1.22 +
1.23 +namespace boost {
1.24 +
1.25 +namespace detail
1.26 +{
1.27 + template <class P>
1.28 + struct smart_ptr_reference
1.29 + {
1.30 + typedef typename boost::pointee<P>::type& type;
1.31 + };
1.32 +}
1.33 +
1.34 +template <class P>
1.35 +struct indirect_reference
1.36 + : mpl::eval_if<
1.37 + detail::is_incrementable<P>
1.38 + , iterator_reference<P>
1.39 + , detail::smart_ptr_reference<P>
1.40 + >
1.41 +{
1.42 +};
1.43 +
1.44 +} // namespace boost
1.45 +
1.46 +#endif // INDIRECT_REFERENCE_DWA200415_HPP