Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:00

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 #if !defined(FUSION_BEGIN_IMPL_07162005_1031)
0008 #define FUSION_BEGIN_IMPL_07162005_1031
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/view/transform_view/transform_view_fwd.hpp>
0012 
0013 namespace boost { namespace fusion
0014 {
0015     template <typename First, typename F>
0016     struct transform_view_iterator;
0017 
0018     template <typename First1, typename First2, typename F>
0019     struct transform_view_iterator2;
0020 
0021     namespace extension
0022     {
0023         template <typename Tag>
0024         struct begin_impl;
0025 
0026         // Unary Version
0027         template <>
0028         struct begin_impl<transform_view_tag>
0029         {
0030             template <typename Sequence>
0031             struct apply
0032             {
0033                 typedef typename Sequence::first_type first_type;
0034                 typedef typename Sequence::transform_type transform_type;
0035                 typedef transform_view_iterator<first_type, transform_type> type;
0036 
0037                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0038                 static type
0039                 call(Sequence& s)
0040                 {
0041                     return type(s.first(), s.f);
0042                 }
0043             };
0044         };
0045 
0046         // Binary Version
0047         template <>
0048         struct begin_impl<transform_view2_tag>
0049         {
0050             template <typename Sequence>
0051             struct apply
0052             {
0053                 typedef typename Sequence::first1_type first1_type;
0054                 typedef typename Sequence::first2_type first2_type;
0055                 typedef typename Sequence::transform_type transform_type;
0056                 typedef transform_view_iterator2<first1_type, first2_type, transform_type> type;
0057 
0058                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0059                 static type
0060                 call(Sequence& s)
0061                 {
0062                     return type(s.first1(), s.first2(), s.f);
0063                 }
0064             };
0065         };
0066     }
0067 }}
0068 
0069 #endif
0070 
0071