Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/fusion/view/single_view/detail/next_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) 2011 Eric Niebler
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(BOOST_FUSION_SINGLE_VIEW_NEXT_IMPL_05052005_0331)
0009 #define BOOST_FUSION_SINGLE_VIEW_NEXT_IMPL_05052005_0331
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/mpl/next.hpp>
0013 #include <boost/static_assert.hpp>
0014 
0015 namespace boost { namespace fusion
0016 {
0017     struct single_view_iterator_tag;
0018 
0019     template <typename SingleView, typename Pos>
0020     struct single_view_iterator;
0021 
0022     namespace extension
0023     {
0024         template <typename Tag>
0025         struct next_impl;
0026 
0027         template <>
0028         struct next_impl<single_view_iterator_tag>
0029         {
0030             template <typename Iterator>
0031             struct apply
0032             {
0033                 typedef single_view_iterator<
0034                     typename Iterator::single_view_type,
0035                     typename mpl::next<typename Iterator::position>::type>
0036                 type;
0037 
0038                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0039                 static type
0040                 call(Iterator const& i)
0041                 {
0042                     // Workaround for ICE on GCC 4.0.0.
0043                     // see https://svn.boost.org/trac/boost/ticket/5808
0044                     typedef typename type::position position;
0045                     BOOST_STATIC_ASSERT((position::value < 2));
0046                     return type(i.view);
0047                 }
0048             };
0049         };
0050     }
0051 }}
0052 
0053 #endif
0054 
0055