Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:34:41

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_SEGMENTED_SEQUENCE_HPP_INCLUDED)
0008 #define BOOST_FUSION_SEGMENTED_SEQUENCE_HPP_INCLUDED
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/mpl/bool.hpp>
0012 #include <boost/type_traits/remove_reference.hpp>
0013 #include <boost/fusion/support/tag_of.hpp>
0014 #include <boost/fusion/sequence/intrinsic_fwd.hpp>
0015 
0016 #ifdef _MSC_VER
0017 #  pragma warning(push)
0018 #  pragma warning(disable: 4512) // assignment operator could not be generated.
0019 #endif
0020 
0021 namespace boost { namespace fusion { namespace detail
0022 {
0023     struct segment_sequence_tag {};
0024 
0025     // Here, Sequence is a sequence of ranges (which may or may not be
0026     // segmented).
0027     template<typename Sequence>
0028     struct segment_sequence
0029         : sequence_base<segment_sequence<Sequence> >
0030     {
0031         typedef fusion_sequence_tag tag;
0032         typedef segment_sequence_tag fusion_tag;
0033         typedef typename Sequence::is_view is_view;
0034         typedef typename Sequence::category category;
0035         typedef Sequence sequence_type;
0036         sequence_type sequence;
0037 
0038         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit segment_sequence(Sequence const & seq)
0039             : sequence(seq)
0040         {}
0041     };
0042 }
0043 
0044 #ifdef _MSC_VER
0045 #  pragma warning(pop)
0046 #endif
0047 
0048 namespace extension
0049 {
0050     template<typename Tag>
0051     struct is_segmented_impl;
0052 
0053     template<>
0054     struct is_segmented_impl<detail::segment_sequence_tag>
0055     {
0056         template<typename Sequence>
0057         struct apply
0058             : mpl::true_
0059         {};
0060     };
0061 
0062     template<typename Tag>
0063     struct segments_impl;
0064 
0065     template<>
0066     struct segments_impl<detail::segment_sequence_tag>
0067     {
0068         template<typename Sequence>
0069         struct apply
0070         {
0071             typedef typename Sequence::sequence_type type;
0072 
0073             BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0074             static type call(Sequence & seq)
0075             {
0076                 return seq.sequence;
0077             }
0078         };
0079     };
0080 }}}
0081 
0082 #endif