Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/indirect_reference.hpp @ 125:34e428693f5d vext
Vext -> Repoint
author | Chris Cannam |
---|---|
date | Thu, 14 Jun 2018 11:15:39 +0100 |
parents | c530137014c0 |
children |
rev | line source |
---|---|
Chris@16 | 1 #ifndef INDIRECT_REFERENCE_DWA200415_HPP |
Chris@16 | 2 # define INDIRECT_REFERENCE_DWA200415_HPP |
Chris@16 | 3 |
Chris@16 | 4 // |
Chris@16 | 5 // Copyright David Abrahams 2004. Use, modification and distribution is |
Chris@16 | 6 // subject to the Boost Software License, Version 1.0. (See accompanying |
Chris@16 | 7 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 8 // |
Chris@16 | 9 // typename indirect_reference<P>::type provides the type of *p. |
Chris@16 | 10 // |
Chris@16 | 11 // http://www.boost.org/libs/iterator/doc/pointee.html |
Chris@16 | 12 // |
Chris@16 | 13 |
Chris@16 | 14 # include <boost/detail/is_incrementable.hpp> |
Chris@16 | 15 # include <boost/iterator/iterator_traits.hpp> |
Chris@16 | 16 # include <boost/type_traits/remove_cv.hpp> |
Chris@16 | 17 # include <boost/mpl/eval_if.hpp> |
Chris@16 | 18 # include <boost/pointee.hpp> |
Chris@16 | 19 |
Chris@101 | 20 namespace boost { |
Chris@16 | 21 |
Chris@16 | 22 namespace detail |
Chris@16 | 23 { |
Chris@16 | 24 template <class P> |
Chris@16 | 25 struct smart_ptr_reference |
Chris@16 | 26 { |
Chris@16 | 27 typedef typename boost::pointee<P>::type& type; |
Chris@16 | 28 }; |
Chris@16 | 29 } |
Chris@16 | 30 |
Chris@16 | 31 template <class P> |
Chris@16 | 32 struct indirect_reference |
Chris@16 | 33 : mpl::eval_if< |
Chris@16 | 34 detail::is_incrementable<P> |
Chris@16 | 35 , iterator_reference<P> |
Chris@16 | 36 , detail::smart_ptr_reference<P> |
Chris@16 | 37 > |
Chris@16 | 38 { |
Chris@16 | 39 }; |
Chris@101 | 40 |
Chris@16 | 41 } // namespace boost |
Chris@16 | 42 |
Chris@16 | 43 #endif // INDIRECT_REFERENCE_DWA200415_HPP |