File indexing completed on 2025-03-13 08:50:56
0001
0002 #ifndef BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
0003 #define BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include <boost/mpl/transform.hpp>
0019 #include <boost/mpl/begin_end.hpp>
0020 #include <boost/mpl/iterator_tags.hpp>
0021 #include <boost/mpl/next.hpp>
0022 #include <boost/mpl/lambda.hpp>
0023 #include <boost/mpl/deref.hpp>
0024 #include <boost/mpl/aux_/na_spec.hpp>
0025
0026 namespace boost { namespace mpl {
0027
0028 template< typename IteratorSeq >
0029 struct zip_iterator
0030 {
0031 typedef forward_iterator_tag category;
0032 typedef typename transform1<
0033 IteratorSeq
0034 , deref<_1>
0035 >::type type;
0036
0037 typedef zip_iterator<
0038 typename transform1<
0039 IteratorSeq
0040 , mpl::next<_1>
0041 >::type
0042 > next;
0043 };
0044
0045 template<
0046 typename BOOST_MPL_AUX_NA_PARAM(Sequences)
0047 >
0048 struct zip_view
0049 {
0050 private:
0051 typedef typename transform1< Sequences, mpl::begin<_1> >::type first_ones_;
0052 typedef typename transform1< Sequences, mpl::end<_1> >::type last_ones_;
0053
0054 public:
0055 typedef nested_begin_end_tag tag;
0056 typedef zip_view type;
0057 typedef zip_iterator<first_ones_> begin;
0058 typedef zip_iterator<last_ones_> end;
0059 };
0060
0061 BOOST_MPL_AUX_NA_SPEC(1, zip_view)
0062
0063 }}
0064
0065 #endif