]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/mpl/zip_view.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
c05f9cccfc60b64108401f6dd8be861a1fad50fc
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / mpl / zip_view.hpp
1 \r
2 #ifndef BOOST_MPL_ZIP_VIEW_HPP_INCLUDED\r
3 #define BOOST_MPL_ZIP_VIEW_HPP_INCLUDED\r
4 \r
5 // Copyright Aleksey Gurtovoy 2000-2002\r
6 // Copyright David Abrahams 2000-2002\r
7 //\r
8 // Distributed under the Boost Software License, Version 1.0.\r
9 // (See accompanying file LICENSE_1_0.txt or copy at \r
10 // http://www.boost.org/LICENSE_1_0.txt)\r
11 //\r
12 // See http://www.boost.org/libs/mpl for documentation.\r
13 \r
14 // $Id: zip_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $\r
15 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $\r
16 // $Revision: 49267 $\r
17 \r
18 #include <boost/mpl/transform.hpp>\r
19 #include <boost/mpl/begin_end.hpp>\r
20 #include <boost/mpl/iterator_tags.hpp>\r
21 #include <boost/mpl/next.hpp>\r
22 #include <boost/mpl/lambda.hpp>\r
23 #include <boost/mpl/deref.hpp>\r
24 #include <boost/mpl/aux_/na_spec.hpp>\r
25 \r
26 namespace boost { namespace mpl {\r
27 \r
28 template< typename IteratorSeq >\r
29 struct zip_iterator\r
30 {\r
31     typedef forward_iterator_tag category;\r
32     typedef typename transform1<\r
33           IteratorSeq\r
34         , deref<_1>\r
35         >::type type;\r
36 \r
37     typedef zip_iterator<\r
38           typename transform1<\r
39                 IteratorSeq\r
40               , mpl::next<_1>\r
41             >::type\r
42         > next;\r
43 };\r
44 \r
45 template<\r
46       typename BOOST_MPL_AUX_NA_PARAM(Sequences)\r
47     >\r
48 struct zip_view\r
49 {\r
50  private:\r
51     typedef typename transform1< Sequences, mpl::begin<_1> >::type first_ones_;\r
52     typedef typename transform1< Sequences, mpl::end<_1> >::type last_ones_;\r
53     \r
54  public:\r
55     typedef nested_begin_end_tag tag;\r
56     typedef zip_iterator<first_ones_> begin;\r
57     typedef zip_iterator<last_ones_> end;\r
58 };\r
59 \r
60 BOOST_MPL_AUX_NA_SPEC(1, zip_view)\r
61 \r
62 }}\r
63 \r
64 #endif // BOOST_MPL_ZIP_VIEW_HPP_INCLUDED\r