annotate DEPENDENCIES/generic/include/boost/mpl/zip_view.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1
Chris@16 2 #ifndef BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
Chris@16 3 #define BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
Chris@16 4
Chris@16 5 // Copyright Aleksey Gurtovoy 2000-2010
Chris@16 6 // Copyright David Abrahams 2000-2002
Chris@16 7 //
Chris@16 8 // Distributed under the Boost Software License, Version 1.0.
Chris@16 9 // (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 10 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 11 //
Chris@16 12 // See http://www.boost.org/libs/mpl for documentation.
Chris@16 13
Chris@101 14 // $Id$
Chris@101 15 // $Date$
Chris@101 16 // $Revision$
Chris@16 17
Chris@16 18 #include <boost/mpl/transform.hpp>
Chris@16 19 #include <boost/mpl/begin_end.hpp>
Chris@16 20 #include <boost/mpl/iterator_tags.hpp>
Chris@16 21 #include <boost/mpl/next.hpp>
Chris@16 22 #include <boost/mpl/lambda.hpp>
Chris@16 23 #include <boost/mpl/deref.hpp>
Chris@16 24 #include <boost/mpl/aux_/na_spec.hpp>
Chris@16 25
Chris@16 26 namespace boost { namespace mpl {
Chris@16 27
Chris@16 28 template< typename IteratorSeq >
Chris@16 29 struct zip_iterator
Chris@16 30 {
Chris@16 31 typedef forward_iterator_tag category;
Chris@16 32 typedef typename transform1<
Chris@16 33 IteratorSeq
Chris@16 34 , deref<_1>
Chris@16 35 >::type type;
Chris@16 36
Chris@16 37 typedef zip_iterator<
Chris@16 38 typename transform1<
Chris@16 39 IteratorSeq
Chris@16 40 , mpl::next<_1>
Chris@16 41 >::type
Chris@16 42 > next;
Chris@16 43 };
Chris@16 44
Chris@16 45 template<
Chris@16 46 typename BOOST_MPL_AUX_NA_PARAM(Sequences)
Chris@16 47 >
Chris@16 48 struct zip_view
Chris@16 49 {
Chris@16 50 private:
Chris@16 51 typedef typename transform1< Sequences, mpl::begin<_1> >::type first_ones_;
Chris@16 52 typedef typename transform1< Sequences, mpl::end<_1> >::type last_ones_;
Chris@16 53
Chris@16 54 public:
Chris@16 55 typedef nested_begin_end_tag tag;
Chris@16 56 typedef zip_view type;
Chris@16 57 typedef zip_iterator<first_ones_> begin;
Chris@16 58 typedef zip_iterator<last_ones_> end;
Chris@16 59 };
Chris@16 60
Chris@16 61 BOOST_MPL_AUX_NA_SPEC(1, zip_view)
Chris@16 62
Chris@16 63 }}
Chris@16 64
Chris@16 65 #endif // BOOST_MPL_ZIP_VIEW_HPP_INCLUDED