]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2009 Hartmut Kaiser | |
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 | ||
8 | #if !defined(BOOST_FUSION_NVIEW_DISTANCE_IMPL_SEP_23_2009_0328PM) | |
9 | #define BOOST_FUSION_NVIEW_DISTANCE_IMPL_SEP_23_2009_0328PM | |
10 | ||
11 | #include <boost/fusion/support/config.hpp> | |
12 | #include <boost/fusion/iterator/distance.hpp> | |
13 | ||
14 | namespace boost { namespace fusion | |
15 | { | |
16 | struct nview_iterator_tag; | |
17 | ||
18 | namespace extension | |
19 | { | |
20 | template<typename Tag> | |
21 | struct distance_impl; | |
22 | ||
23 | template<> | |
24 | struct distance_impl<nview_iterator_tag> | |
25 | { | |
26 | template<typename First, typename Last> | |
27 | struct apply | |
28 | : result_of::distance<typename First::first_type, typename Last::first_type> | |
29 | { | |
30 | typedef typename result_of::distance< | |
31 | typename First::first_type, typename Last::first_type | |
32 | >::type type; | |
33 | ||
34 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
35 | static type | |
36 | call(First const& /*first*/, Last const& /*last*/) | |
37 | { | |
38 | return type(); | |
39 | } | |
40 | }; | |
41 | }; | |
42 | } | |
43 | ||
44 | }} | |
45 | ||
46 | #endif |