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_NEXT_IMPL_07162005_1029)
0008 #define FUSION_NEXT_IMPL_07162005_1029
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/iterator/next.hpp>
0012 
0013 namespace boost { namespace fusion
0014 {
0015     struct transform_view_iterator_tag;
0016     struct transform_view_iterator2_tag;
0017 
0018     template<typename First, typename F>
0019     struct transform_view_iterator;
0020 
0021     template <typename First1, typename First2, typename F>
0022     struct transform_view_iterator2;
0023 
0024     namespace extension
0025     {
0026         template <typename Tag>
0027         struct next_impl;
0028 
0029         // Unary Version
0030         template <>
0031         struct next_impl<transform_view_iterator_tag>
0032         {
0033             template <typename Iterator>
0034             struct apply
0035             {
0036                 typedef typename Iterator::first_type first_type;
0037                 typedef typename result_of::next<first_type>::type next_type;
0038                 typedef typename Iterator::transform_type transform_type;
0039                 typedef transform_view_iterator<next_type, transform_type> type;
0040 
0041                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0042                 static type
0043                 call(Iterator const& i)
0044                 {
0045                     return type(fusion::next(i.first), i.f);
0046                 }
0047             };
0048         };
0049 
0050         // Binary Version
0051         template <>
0052         struct next_impl<transform_view_iterator2_tag>
0053         {
0054             template <typename Iterator>
0055             struct apply
0056             {
0057                 typedef typename Iterator::first1_type first1_type;
0058                 typedef typename Iterator::first2_type first2_type;
0059                 typedef typename result_of::next<first1_type>::type next1_type;
0060                 typedef typename result_of::next<first2_type>::type next2_type;
0061                 typedef typename Iterator::transform_type transform_type;
0062                 typedef transform_view_iterator2<next1_type, next2_type, transform_type> type;
0063 
0064                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0065                 static type
0066                 call(Iterator const& i)
0067                 {
0068                     return type(fusion::next(i.first1), fusion::next(i.first2), i.f);
0069                 }
0070             };
0071         };
0072     }
0073 }}
0074 
0075 #endif
0076 
0077