source: XIOS/dev/dev_olga/src/extern/boost/include/boost/mpl/zip_view.hpp @ 1022

Last change on this file since 1022 was 1022, checked in by mhnguyen, 7 years ago
File size: 1.6 KB
Line 
1
2#ifndef BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
3#define BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
4
5// Copyright Aleksey Gurtovoy 2000-2010
6// Copyright David Abrahams 2000-2002
7//
8// Distributed under the Boost Software License, Version 1.0.
9// (See accompanying file LICENSE_1_0.txt or copy at
10// http://www.boost.org/LICENSE_1_0.txt)
11//
12// See http://www.boost.org/libs/mpl for documentation.
13
14// $Id: zip_view.hpp 61591 2010-04-26 21:31:09Z agurtovoy $
15// $Date: 2010-04-26 17:31:09 -0400 (Mon, 26 Apr 2010) $
16// $Revision: 61591 $
17
18#include <boost/mpl/transform.hpp>
19#include <boost/mpl/begin_end.hpp>
20#include <boost/mpl/iterator_tags.hpp>
21#include <boost/mpl/next.hpp>
22#include <boost/mpl/lambda.hpp>
23#include <boost/mpl/deref.hpp>
24#include <boost/mpl/aux_/na_spec.hpp>
25
26namespace boost { namespace mpl {
27
28template< typename IteratorSeq >
29struct zip_iterator
30{
31    typedef forward_iterator_tag category;
32    typedef typename transform1<
33          IteratorSeq
34        , deref<_1>
35        >::type type;
36
37    typedef zip_iterator<
38          typename transform1<
39                IteratorSeq
40              , mpl::next<_1>
41            >::type
42        > next;
43};
44
45template<
46      typename BOOST_MPL_AUX_NA_PARAM(Sequences)
47    >
48struct zip_view
49{
50 private:
51    typedef typename transform1< Sequences, mpl::begin<_1> >::type first_ones_;
52    typedef typename transform1< Sequences, mpl::end<_1> >::type last_ones_;
53   
54 public:
55    typedef nested_begin_end_tag tag;
56    typedef zip_view type;
57    typedef zip_iterator<first_ones_> begin;
58    typedef zip_iterator<last_ones_> end;
59};
60
61BOOST_MPL_AUX_NA_SPEC(1, zip_view)
62
63}}
64
65#endif // BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.