Back to home page

EIC code displayed by LXR

 
 

    


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

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_IS_SEGMENTED_HPP_INCLUDED)
0008 #define BOOST_FUSION_ITERATOR_RANGE_IS_SEGMENTED_HPP_INCLUDED
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/mpl/assert.hpp>
0012 #include <boost/mpl/bool.hpp>
0013 
0014 namespace boost { namespace fusion
0015 {
0016     struct iterator_range_tag;
0017 
0018     template <typename Context>
0019     struct segmented_iterator;
0020 
0021     namespace extension
0022     {
0023         template <typename Tag>
0024         struct is_segmented_impl;
0025 
0026         // An iterator_range of segmented_iterators is segmented
0027         template <>
0028         struct is_segmented_impl<iterator_range_tag>
0029         {
0030         private:
0031             template <typename Iterator>
0032             struct is_segmented_iterator
0033               : mpl::false_
0034             {};
0035 
0036             template <typename Iterator>
0037             struct is_segmented_iterator<Iterator &>
0038               : is_segmented_iterator<Iterator>
0039             {};
0040 
0041             template <typename Iterator>
0042             struct is_segmented_iterator<Iterator const>
0043               : is_segmented_iterator<Iterator>
0044             {};
0045 
0046             template <typename Context>
0047             struct is_segmented_iterator<segmented_iterator<Context> >
0048               : mpl::true_
0049             {};
0050 
0051         public:
0052             template <typename Sequence>
0053             struct apply
0054               : is_segmented_iterator<typename Sequence::begin_type>
0055             {
0056                 BOOST_MPL_ASSERT_RELATION(
0057                     is_segmented_iterator<typename Sequence::begin_type>::value
0058                   , ==
0059                   , is_segmented_iterator<typename Sequence::end_type>::value);
0060             };
0061         };
0062     }
0063 }}
0064 
0065 #endif
0066 
0067