1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
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_NEXT_IMPL_07162005_1029)
8 #define FUSION_NEXT_IMPL_07162005_1029
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/iterator/next.hpp>
13 namespace boost { namespace fusion
15 struct transform_view_iterator_tag;
16 struct transform_view_iterator2_tag;
18 template<typename First, typename F>
19 struct transform_view_iterator;
21 template <typename First1, typename First2, typename F>
22 struct transform_view_iterator2;
26 template <typename Tag>
31 struct next_impl<transform_view_iterator_tag>
33 template <typename Iterator>
36 typedef typename Iterator::first_type first_type;
37 typedef typename result_of::next<first_type>::type next_type;
38 typedef typename Iterator::transform_type transform_type;
39 typedef transform_view_iterator<next_type, transform_type> type;
41 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
43 call(Iterator const& i)
45 return type(fusion::next(i.first), i.f);
52 struct next_impl<transform_view_iterator2_tag>
54 template <typename Iterator>
57 typedef typename Iterator::first1_type first1_type;
58 typedef typename Iterator::first2_type first2_type;
59 typedef typename result_of::next<first1_type>::type next1_type;
60 typedef typename result_of::next<first2_type>::type next2_type;
61 typedef typename Iterator::transform_type transform_type;
62 typedef transform_view_iterator2<next1_type, next2_type, transform_type> type;
64 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
66 call(Iterator const& i)
68 return type(fusion::next(i.first1), fusion::next(i.first2), i.f);