| 1 | /*============================================================================= |
|---|---|
| 2 | Copyright (c) 2001-2011 Joel de Guzman |
| 3 | Copyright (c) 2006 Dan Marsden |
| 4 | |
| 5 | Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 6 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 7 | ==============================================================================*/ |
| 8 | #if !defined(FUSION_ZIP_VIEW_ITERATOR_23012006_0814) |
| 9 | #define FUSION_ZIP_VIEW_ITERATOR_23012006_0814 |
| 10 | |
| 11 | #include <boost/fusion/support/config.hpp> |
| 12 | #include <boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp> |
| 13 | #include <boost/fusion/support/iterator_base.hpp> |
| 14 | #include <boost/fusion/view/zip_view/detail/deref_impl.hpp> |
| 15 | #include <boost/fusion/view/zip_view/detail/next_impl.hpp> |
| 16 | #include <boost/fusion/view/zip_view/detail/prior_impl.hpp> |
| 17 | #include <boost/fusion/view/zip_view/detail/advance_impl.hpp> |
| 18 | #include <boost/fusion/view/zip_view/detail/distance_impl.hpp> |
| 19 | #include <boost/fusion/view/zip_view/detail/value_of_impl.hpp> |
| 20 | #include <boost/fusion/view/zip_view/detail/equal_to_impl.hpp> |
| 21 | |
| 22 | #include <boost/fusion/container/vector/convert.hpp> |
| 23 | |
| 24 | namespace boost { namespace fusion { |
| 25 | |
| 26 | struct zip_view_iterator_tag; |
| 27 | |
| 28 | template< |
| 29 | typename IteratorSequence, |
| 30 | typename Traversal> |
| 31 | struct zip_view_iterator |
| 32 | : iterator_base<zip_view_iterator<IteratorSequence, Traversal> > |
| 33 | { |
| 34 | typedef zip_view_iterator_tag fusion_tag; |
| 35 | typedef Traversal category; |
| 36 | |
| 37 | template<typename InitSeq> |
| 38 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
| 39 | zip_view_iterator( |
| 40 | const InitSeq& iterator_seq) |
| 41 | : iterators_(iterator_seq) |
| 42 | {} |
| 43 | |
| 44 | typedef typename result_of::as_vector<IteratorSequence>::type iterators; |
| 45 | iterators iterators_; |
| 46 | }; |
| 47 | }} |
| 48 | |
| 49 | #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 |
| 50 | namespace std |
| 51 | { |
| 52 | template <typename IteratorSequence, typename Traversal> |
| 53 | struct iterator_traits< ::boost::fusion::zip_view_iterator<IteratorSequence, Traversal> > |
| 54 | { }; |
| 55 | } |
| 56 | #endif |
| 57 | |
| 58 | #endif |
| 59 |