2 #ifndef BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED
3 #define BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED
5 // Copyright Aleksey Gurtovoy 2003-2004
6 // Copyright David Abrahams 2003-2004
8 // Distributed under the Boost Software License, Version 1.0.
9 // (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 // See http://www.boost.org/libs/mpl for documentation.
18 #include <boost/mpl/map/aux_/map0.hpp>
19 #include <boost/mpl/map/aux_/at_impl.hpp>
20 #include <boost/mpl/map/aux_/tag.hpp>
21 #include <boost/mpl/iterator_tags.hpp>
22 #include <boost/mpl/if.hpp>
23 #include <boost/mpl/next.hpp>
24 #include <boost/mpl/deref.hpp>
25 #include <boost/mpl/long.hpp>
26 #include <boost/mpl/void.hpp>
27 #include <boost/mpl/aux_/nttp_decl.hpp>
28 #include <boost/mpl/aux_/config/ctps.hpp>
30 namespace boost { namespace mpl {
32 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
41 is_void_< typename item_by_order<Map,order>::type >
42 , next_order<Map,(order+1),max_order>
52 struct next_order<Map,max_order,max_order>
58 template< typename Map, long order, long max_order >
61 typedef forward_iterator_tag category;
62 typedef typename item_by_order<Map,order>::type type;
65 template< typename Map, long max_order >
66 struct m_iter<Map,max_order,max_order>
68 typedef forward_iterator_tag category;
72 template< typename Map, long order, long max_order >
73 struct next< m_iter<Map,order,max_order> >
77 , next_order<Map,order+1,max_order>::value
82 template< typename Map, long max_order >
83 struct next< m_iter<Map,max_order,max_order> >
91 , BOOST_MPL_AUX_NTTP_DECL(long, order)
92 , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
98 , BOOST_MPL_AUX_NTTP_DECL(long, order)
99 , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
101 struct next_order_impl
103 is_void_< typename item_by_order<Map,order>::type >
104 , next_order<Map,(order+1),max_order>
112 , BOOST_MPL_AUX_NTTP_DECL(long, order)
113 , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
118 , next_order_impl<Map,order,max_order>
127 , BOOST_MPL_AUX_NTTP_DECL(long, order)
128 , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
132 struct m_iter_empty_base {};
136 , BOOST_MPL_AUX_NTTP_DECL(long, order)
137 , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
141 typedef typename item_by_order<Map,order>::type type;
145 , next_order<Map,order+1,max_order>::value
152 , BOOST_MPL_AUX_NTTP_DECL(long, order)
153 , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
159 , m_iter_base<Map,order,max_order>
162 typedef forward_iterator_tag category;
165 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
169 #endif // BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED