]> git.lyx.org Git - lyx.git/blob - boost/boost/indirect_reference.hpp
Delete all .cvsignore files from trunk
[lyx.git] / boost / boost / indirect_reference.hpp
1 // Copyright David Abrahams 2004. Use, modification and distribution is
2 // subject to the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4 #ifndef INDIRECT_REFERENCE_DWA200415_HPP
5 # define INDIRECT_REFERENCE_DWA200415_HPP
6
7 // dereferenceable_traits provides access to the value_type and
8 // reference of a Dereferenceable type.
9
10 # include <boost/detail/is_incrementable.hpp>
11 # include <boost/iterator/iterator_traits.hpp>
12 # include <boost/type_traits/remove_cv.hpp>
13 # include <boost/mpl/eval_if.hpp>
14 # include <boost/pointee.hpp>
15
16 namespace boost { 
17
18 namespace detail
19 {
20   template <class P>
21   struct smart_ptr_reference
22   {
23       typedef typename boost::pointee<P>::type& type;
24   };
25 }
26
27 template <class P>
28 struct indirect_reference
29   : mpl::eval_if<
30         detail::is_incrementable<P>
31       , iterator_reference<P>
32       , detail::smart_ptr_reference<P>
33     >
34 {
35 };
36   
37 } // namespace boost
38
39 #endif // INDIRECT_REFERENCE_DWA200415_HPP