Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*=============================================================================
0002     Copyright (c) 2007 Tobias Schwinger
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 
0008 #ifndef BOOST_FUSION_REPETITIVE_VIEW_ITERATOR_HPP_INCLUDED
0009 #define BOOST_FUSION_REPETITIVE_VIEW_ITERATOR_HPP_INCLUDED
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/support/iterator_base.hpp>
0013 #include <boost/fusion/support/category_of.hpp>
0014 #include <boost/fusion/iterator/mpl/convert_iterator.hpp>
0015 #include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
0016 #include <boost/fusion/sequence/intrinsic/begin.hpp>
0017 #include <boost/fusion/sequence/intrinsic/end.hpp>
0018 #include <boost/fusion/view/repetitive_view/detail/deref_impl.hpp>
0019 #include <boost/fusion/view/repetitive_view/detail/next_impl.hpp>
0020 #include <boost/fusion/view/repetitive_view/detail/value_of_impl.hpp>
0021 
0022 #ifdef _MSC_VER
0023 #  pragma warning(push)
0024 #  pragma warning(disable: 4512) // assignment operator could not be generated.
0025 #endif
0026 
0027 namespace boost { namespace fusion
0028 {
0029     struct repetitive_view_iterator_tag;
0030 
0031     template<typename Sequence, typename Pos =
0032         typename result_of::begin<Sequence>::type>
0033     struct repetitive_view_iterator
0034         : iterator_base< repetitive_view_iterator<Sequence,Pos> >
0035     {
0036         typedef repetitive_view_iterator_tag fusion_tag;
0037 
0038         typedef Sequence sequence_type;
0039         typedef typename convert_iterator<Pos>::type pos_type;
0040         typedef typename convert_iterator<typename result_of::begin<Sequence>::type>::type first_type;
0041         typedef typename convert_iterator<typename result_of::end<Sequence>::type>::type end_type;
0042         typedef single_pass_traversal_tag category;
0043 
0044         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0045         explicit repetitive_view_iterator(Sequence& in_seq)
0046             : seq(in_seq), pos(begin(in_seq)) {}
0047 
0048         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0049         repetitive_view_iterator(Sequence& in_seq, pos_type const& in_pos)
0050             : seq(in_seq), pos(in_pos) {}
0051 
0052         Sequence& seq;
0053         pos_type pos;
0054     };
0055 }}
0056 
0057 #ifdef _MSC_VER
0058 #  pragma warning(pop)
0059 #endif
0060 
0061 #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
0062 namespace std
0063 {
0064     template <typename Sequence, typename Pos>
0065     struct iterator_traits< ::boost::fusion::repetitive_view_iterator<Sequence, Pos> >
0066     { };
0067 }
0068 #endif
0069 
0070 #endif
0071