File indexing completed on 2025-01-18 09:34:59
0001
0002
0003
0004
0005
0006
0007
0008 #if !defined(FUSION_ADVANCE_IMPL_13122005_1906)
0009 #define FUSION_ADVANCE_IMPL_13122005_1906
0010
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/iterator/advance.hpp>
0013
0014 namespace boost { namespace fusion
0015 {
0016 struct transform_view_iterator_tag;
0017 struct transform_view_iterator2_tag;
0018
0019 template<typename First, typename F>
0020 struct transform_view_iterator;
0021
0022 template <typename First1, typename First2, typename F>
0023 struct transform_view_iterator2;
0024
0025 namespace extension
0026 {
0027 template<typename Tag>
0028 struct advance_impl;
0029
0030
0031 template<>
0032 struct advance_impl<transform_view_iterator_tag>
0033 {
0034 template<typename Iterator, typename Dist>
0035 struct apply
0036 {
0037 typedef typename Iterator::first_type first_type;
0038 typedef typename result_of::advance<first_type, Dist>::type advanced_type;
0039 typedef typename Iterator::transform_type transform_type;
0040 typedef transform_view_iterator<advanced_type, transform_type> type;
0041
0042 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0043 static type
0044 call(Iterator const& i)
0045 {
0046 return type(boost::fusion::advance<Dist>(i.first), i.f);
0047 }
0048 };
0049 };
0050
0051
0052 template<>
0053 struct advance_impl<transform_view_iterator2_tag>
0054 {
0055 template<typename Iterator, typename Dist>
0056 struct apply
0057 {
0058 typedef typename Iterator::first1_type first1_type;
0059 typedef typename Iterator::first2_type first2_type;
0060 typedef typename result_of::advance<first1_type, Dist>::type advanced1_type;
0061 typedef typename result_of::advance<first2_type, Dist>::type advanced2_type;
0062 typedef typename Iterator::transform_type transform_type;
0063 typedef transform_view_iterator2<advanced1_type, advanced2_type, transform_type> type;
0064
0065 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0066 static type
0067 call(Iterator const& i)
0068 {
0069 return type(
0070 boost::fusion::advance<Dist>(i.first1)
0071 , boost::fusion::advance<Dist>(i.first2), i.f);
0072 }
0073 };
0074 };
0075 }
0076 }}
0077
0078 #endif