Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:41:55

0001 /*=============================================================================
0002     Copyright (c) 2011 Eric Niebler
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(BOOST_FUSION_ITERATOR_RANGE_SEGMENTS_HPP_INCLUDED)
0008 #define BOOST_FUSION_ITERATOR_RANGE_SEGMENTS_HPP_INCLUDED
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/mpl/assert.hpp>
0012 #include <boost/fusion/sequence/intrinsic/segments.hpp>
0013 #include <boost/fusion/support/is_segmented.hpp>
0014 #include <boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp>
0015 
0016 namespace boost { namespace fusion
0017 {
0018     struct iterator_range_tag;
0019 
0020     namespace extension
0021     {
0022         template <typename Tag>
0023         struct segments_impl;
0024 
0025         template <>
0026         struct segments_impl<iterator_range_tag>
0027         {
0028             template <typename Sequence>
0029             struct apply
0030             {
0031                 typedef
0032                     detail::make_segmented_range<
0033                         typename Sequence::begin_type
0034                       , typename Sequence::end_type
0035                     >
0036                 impl;
0037 
0038                 BOOST_MPL_ASSERT((traits::is_segmented<typename impl::type>));
0039 
0040                 typedef
0041                     typename result_of::segments<typename impl::type>::type
0042                 type;
0043 
0044                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0045                 static type call(Sequence & seq)
0046                 {
0047                     return fusion::segments(impl::call(seq.first, seq.last));
0048                 }
0049             };
0050         };
0051     }
0052 }}
0053 
0054 #endif