PageRenderTime 36ms CodeModel.GetById 29ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/indirect_reference.hpp

http://hadesmem.googlecode.com/
C++ Header | 43 lines | 27 code | 7 blank | 9 comment | 0 complexity | 7ed9cada69a34463591413a7ad5dacae MD5 | raw file
 1#ifndef INDIRECT_REFERENCE_DWA200415_HPP
 2# define INDIRECT_REFERENCE_DWA200415_HPP
 3
 4//
 5// Copyright David Abrahams 2004. Use, modification and distribution is
 6// subject to the Boost Software License, Version 1.0. (See accompanying
 7// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 8//
 9// typename indirect_reference<P>::type provides the type of *p.
10//
11// http://www.boost.org/libs/iterator/doc/pointee.html
12//
13
14# include <boost/detail/is_incrementable.hpp>
15# include <boost/iterator/iterator_traits.hpp>
16# include <boost/type_traits/remove_cv.hpp>
17# include <boost/mpl/eval_if.hpp>
18# include <boost/pointee.hpp>
19
20namespace boost { 
21
22namespace detail
23{
24  template <class P>
25  struct smart_ptr_reference
26  {
27      typedef typename boost::pointee<P>::type& type;
28  };
29}
30
31template <class P>
32struct indirect_reference
33  : mpl::eval_if<
34        detail::is_incrementable<P>
35      , iterator_reference<P>
36      , detail::smart_ptr_reference<P>
37    >
38{
39};
40  
41} // namespace boost
42
43#endif // INDIRECT_REFERENCE_DWA200415_HPP