os/ossrv/ossrv_pub/boost_apis/boost/mpl/zip_view.hpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200 (2012-06-15)
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
sl@0
     2
#ifndef BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
sl@0
     3
#define BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
sl@0
     4
sl@0
     5
// Copyright Aleksey Gurtovoy 2000-2002
sl@0
     6
// Copyright David Abrahams 2000-2002
sl@0
     7
//
sl@0
     8
// Distributed under the Boost Software License, Version 1.0.
sl@0
     9
// (See accompanying file LICENSE_1_0.txt or copy at 
sl@0
    10
// http://www.boost.org/LICENSE_1_0.txt)
sl@0
    11
//
sl@0
    12
// See http://www.boost.org/libs/mpl for documentation.
sl@0
    13
sl@0
    14
// $Source: /cvsroot/boost/boost/boost/mpl/zip_view.hpp,v $
sl@0
    15
// $Date: 2004/09/02 15:40:42 $
sl@0
    16
// $Revision: 1.3 $
sl@0
    17
sl@0
    18
#include <boost/mpl/transform.hpp>
sl@0
    19
#include <boost/mpl/begin_end.hpp>
sl@0
    20
#include <boost/mpl/iterator_tags.hpp>
sl@0
    21
#include <boost/mpl/next.hpp>
sl@0
    22
#include <boost/mpl/lambda.hpp>
sl@0
    23
#include <boost/mpl/deref.hpp>
sl@0
    24
#include <boost/mpl/aux_/na_spec.hpp>
sl@0
    25
sl@0
    26
namespace boost { namespace mpl {
sl@0
    27
sl@0
    28
template< typename IteratorSeq >
sl@0
    29
struct zip_iterator
sl@0
    30
{
sl@0
    31
    typedef forward_iterator_tag category;
sl@0
    32
    typedef typename transform1<
sl@0
    33
          IteratorSeq
sl@0
    34
        , deref<_1>
sl@0
    35
        >::type type;
sl@0
    36
sl@0
    37
    typedef zip_iterator<
sl@0
    38
          typename transform1<
sl@0
    39
                IteratorSeq
sl@0
    40
              , next<_1>
sl@0
    41
            >::type
sl@0
    42
        > next;
sl@0
    43
};
sl@0
    44
sl@0
    45
template<
sl@0
    46
      typename BOOST_MPL_AUX_NA_PARAM(Sequences)
sl@0
    47
    >
sl@0
    48
struct zip_view
sl@0
    49
{
sl@0
    50
 private:
sl@0
    51
    typedef typename transform1< Sequences, begin<_1> >::type first_ones_;
sl@0
    52
    typedef typename transform1< Sequences, end<_1> >::type last_ones_;
sl@0
    53
    
sl@0
    54
 public:
sl@0
    55
    typedef nested_begin_end_tag tag;
sl@0
    56
    typedef zip_iterator<first_ones_> begin;
sl@0
    57
    typedef zip_iterator<last_ones_> end;
sl@0
    58
};
sl@0
    59
sl@0
    60
BOOST_MPL_AUX_NA_SPEC(1, zip_view)
sl@0
    61
sl@0
    62
}}
sl@0
    63
sl@0
    64
#endif // BOOST_MPL_ZIP_VIEW_HPP_INCLUDED