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