/*============================================================================= Copyright (c) 2003 Joel de Guzman Copyright (c) 2004 Peder Holt Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_ITERATOR_TUPLE_ITERATOR_HPP) #define FUSION_ITERATOR_TUPLE_ITERATOR_HPP #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace fusion { struct tuple_iterator_tag; struct void_t; template struct tuple_iterator; template struct tuple_iterator_base : iterator_base > { typedef FUSION_INT(N) index; typedef Tuple tuple; typedef tuple_iterator_tag tag; typedef tuple_iterator self_type; }; template struct tuple_iterator : tuple_iterator_base { typedef typename tuple_iterator_base::tuple tuple; typedef typename tuple_iterator_base::index index; typedef typename mpl::eval_if< mpl::less , detail::tuple_iterator_next_traits_impl > , mpl::identity >::type next; typedef typename mpl::eval_if< mpl::less , detail::tuple_iterator_value_traits_impl > , mpl::identity >::type type; #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) tuple_iterator(tuple_iterator const& i); #else template tuple_iterator(tuple_iterator const& i) : t(static_cast(i.get_tuple())) {} #endif tuple_iterator(tuple& t); tuple& get_tuple() const; private: tuple& t; }; #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) template tuple_iterator::tuple_iterator(tuple_iterator const& i) : t(static_cast(i.get_tuple())) {} #endif template tuple_iterator::tuple_iterator(tuple& t) : t(t) {} template typename tuple_iterator::tuple& tuple_iterator::get_tuple() const { return t; } }} #endif