2 #ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
\r
3 #define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
\r
5 // Copyright Aleksey Gurtovoy 2000-2004
\r
7 // Distributed under the Boost Software License, Version 1.0.
\r
8 // (See accompanying file LICENSE_1_0.txt or copy at
\r
9 // http://www.boost.org/LICENSE_1_0.txt)
\r
11 // See http://www.boost.org/libs/mpl for documentation.
\r
13 // $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
\r
14 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
\r
15 // $Revision: 49267 $
\r
17 #include <boost/mpl/iterator_tags.hpp>
\r
18 #include <boost/mpl/next_prior.hpp>
\r
19 #include <boost/mpl/deref.hpp>
\r
20 #include <boost/mpl/list/aux_/item.hpp>
\r
21 #include <boost/mpl/aux_/na.hpp>
\r
22 #include <boost/mpl/aux_/lambda_spec.hpp>
\r
23 #include <boost/mpl/aux_/config/ctps.hpp>
\r
25 namespace boost { namespace mpl {
\r
27 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
\r
29 template< typename Node >
\r
32 typedef aux::l_iter_tag tag;
\r
33 typedef forward_iterator_tag category;
\r
36 template< typename Node >
\r
37 struct deref< l_iter<Node> >
\r
39 typedef typename Node::item type;
\r
42 template< typename Node >
\r
43 struct next< l_iter<Node> >
\r
45 typedef l_iter< typename Node::next > type;
\r
48 #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
\r
50 template< typename Node >
\r
53 typedef aux::l_iter_tag tag;
\r
54 typedef forward_iterator_tag category;
\r
55 typedef typename Node::item type;
\r
56 typedef l_iter< typename mpl::next<Node>::type > next;
\r
62 template<> struct l_iter<l_end>
\r
64 typedef aux::l_iter_tag tag;
\r
65 typedef forward_iterator_tag category;
\r
66 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
\r
68 typedef l_iter next;
\r
72 BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter)
\r
76 #endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
\r