1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2005-2006 Dan Marsden
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_13122005_2139)
9 #define FUSION_DISTANCE_IMPL_13122005_2139
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/iterator/distance.hpp>
14 namespace boost { namespace fusion {
16 struct transform_view_iterator_tag;
17 struct transform_view_iterator2_tag;
21 template<typename Tag>
26 struct distance_impl<transform_view_iterator_tag>
28 template<typename First, typename Last>
30 : result_of::distance<typename First::first_type, typename Last::first_type>
32 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
34 typename result_of::distance<typename First::first_type, typename Last::first_type>::type
35 call(First const& first, Last const& last)
37 return boost::fusion::distance(first.first, last.first);
44 struct distance_impl<transform_view_iterator2_tag>
46 template<typename First, typename Last>
48 : result_of::distance<typename First::first1_type, typename Last::first1_type>
50 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
52 typename result_of::distance<typename First::first1_type, typename Last::first1_type>::type
53 call(First const& first, Last const& last)
55 return boost::fusion::distance(first.first1, last.first1);