1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2006 Dan Marsden
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(FUSION_ADVANCE_IMPL_20061024_2021)
9 #define FUSION_ADVANCE_IMPL_20061024_2021
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp>
13 #include <boost/fusion/iterator/advance.hpp>
14 #include <boost/fusion/algorithm/transformation/transform.hpp>
15 #include <boost/type_traits/remove_reference.hpp>
17 namespace boost { namespace fusion {
19 struct zip_view_iterator_tag;
26 template<typename Sig>
29 template<typename N1, typename It>
30 struct result<poly_advance<N1>(It)>
32 typedef typename remove_reference<It>::type it;
33 typedef typename result_of::advance<it,N>::type type;
37 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
38 typename result<poly_advance(It)>::type
39 operator()(const It& it) const
41 return fusion::advance<N>(it);
48 template<typename Tag>
52 struct advance_impl<zip_view_iterator_tag>
54 template<typename It, typename N>
57 typedef zip_view_iterator<
58 typename result_of::transform<typename It::iterators, detail::poly_advance<N> >::type> type;
60 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
65 fusion::transform(it.iterators_, detail::poly_advance<N>()));