]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / fusion / include / boost / fusion / view / reverse_view / detail / distance_impl.hpp
1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2005-2006 Dan Marsden
4
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(FUSION_DISTANCE_IMPL_14122005_2104)
9 #define FUSION_DISTANCE_IMPL_14122005_2104
10
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/iterator/distance.hpp>
13
14 namespace boost { namespace fusion {
15
16 struct reverse_view_iterator_tag;
17
18 template <typename Iterator>
19 struct reverse_view_iterator;
20
21 namespace extension
22 {
23 template<typename Tag>
24 struct distance_impl;
25
26 template<>
27 struct distance_impl<reverse_view_iterator_tag>
28 {
29 template<typename First, typename Last>
30 struct apply
31 {
32 typedef typename First::first_type first_type;
33 typedef typename Last::first_type last_type;
34 typedef typename result_of::distance<last_type, first_type>::type type;
35
36 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
37 static type
38 call(First const& first, Last const& last)
39 {
40 return boost::fusion::distance(last.first, first.first);
41 }
42 };
43 };
44 }
45 }}
46
47 #endif