Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/fusion/view/reverse_view/detail/advance_impl.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003     Copyright (c) 2005-2006 Dan Marsden
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #if !defined(FUSION_ADVANCE_IMPL_14122005_2015)
0009 #define FUSION_ADVANCE_IMPL_14122005_2015
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/iterator/advance.hpp>
0013 #include <boost/mpl/negate.hpp>
0014 
0015 namespace boost { namespace fusion {
0016 
0017     struct reverse_view_iterator_tag;
0018 
0019     template <typename Iterator>
0020     struct reverse_view_iterator;
0021 
0022     namespace extension
0023     {
0024         template<typename Tag>
0025         struct advance_impl;
0026 
0027         template<>
0028         struct advance_impl<reverse_view_iterator_tag>
0029         {
0030             template<typename Iterator, typename Dist>
0031             struct apply
0032             {
0033                 typedef typename Iterator::first_type first_type;
0034                 typedef typename mpl::negate<Dist>::type negative_dist;
0035                 typedef typename result_of::advance<first_type, negative_dist>::type advanced_type;
0036                 typedef reverse_view_iterator<advanced_type> type;
0037 
0038                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0039                 static type
0040                 call(Iterator const& i)
0041                 {
0042                     return type(boost::fusion::advance<negative_dist>(i.first));
0043                 }
0044             };
0045         };
0046     }
0047 }}
0048 
0049 #endif