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_BEGIN_IMPL_07162005_1031)
8 #define FUSION_BEGIN_IMPL_07162005_1031
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/view/transform_view/transform_view_fwd.hpp>
13 namespace boost { namespace fusion
15 template <typename First, typename F>
16 struct transform_view_iterator;
18 template <typename First1, typename First2, typename F>
19 struct transform_view_iterator2;
23 template <typename Tag>
28 struct begin_impl<transform_view_tag>
30 template <typename Sequence>
33 typedef typename Sequence::first_type first_type;
34 typedef typename Sequence::transform_type transform_type;
35 typedef transform_view_iterator<first_type, transform_type> type;
37 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
41 return type(s.first(), s.f);
48 struct begin_impl<transform_view2_tag>
50 template <typename Sequence>
53 typedef typename Sequence::first1_type first1_type;
54 typedef typename Sequence::first2_type first2_type;
55 typedef typename Sequence::transform_type transform_type;
56 typedef transform_view_iterator2<first1_type, first2_type, transform_type> type;
58 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
62 return type(s.first1(), s.first2(), s.f);