2 #ifndef BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
\r
3 #define BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
\r
5 // Copyright Aleksey Gurtovoy 2003-2007
\r
6 // Copyright David Abrahams 2003-2004
\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
12 // See http://www.boost.org/libs/mpl for documentation.
\r
14 // $Id: iterator.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
18 #include <boost/mpl/set/aux_/set0.hpp>
\r
19 #include <boost/mpl/has_key.hpp>
\r
20 #include <boost/mpl/iterator_tags.hpp>
\r
21 #include <boost/mpl/next.hpp>
\r
22 #include <boost/mpl/eval_if.hpp>
\r
23 #include <boost/mpl/if.hpp>
\r
24 #include <boost/mpl/identity.hpp>
\r
25 #include <boost/mpl/aux_/config/ctps.hpp>
\r
27 namespace boost { namespace mpl {
\r
29 // used by 's_iter_get'
\r
30 template< typename Set, typename Tail > struct s_iter;
\r
32 template< typename Set, typename Tail > struct s_iter_get
\r
34 has_key< Set,typename Tail::item_type_ >
\r
35 , identity< s_iter<Set,Tail> >
\r
36 , next< s_iter<Set,Tail> >
\r
41 template< typename Set, typename Tail > struct s_iter_impl
\r
44 typedef forward_iterator_tag category;
\r
45 typedef typename Tail::item_type_ type;
\r
47 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
\r
48 typedef typename s_iter_get< Set,typename Tail::base >::type next;
\r
52 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
\r
54 template< typename Set, typename Tail >
\r
55 struct next< s_iter<Set,Tail> >
\r
56 : s_iter_get< Set,typename Tail::base >
\r
60 template< typename Set >
\r
61 struct next< s_iter<Set,set0<> > >
\r
63 typedef s_iter<Set,set0<> > type;
\r
66 template< typename Set, typename Tail > struct s_iter
\r
67 : s_iter_impl<Set,Tail>
\r
71 template< typename Set > struct s_iter<Set, set0<> >
\r
73 typedef forward_iterator_tag category;
\r
78 template< typename Set >
\r
81 typedef forward_iterator_tag category;
\r
82 typedef s_iter<Set,set0<> > next;
\r
85 template< typename Set, typename Tail > struct s_iter
\r
87 is_same< Tail,set0<> >
\r
89 , s_iter_impl<Set,Tail>
\r
94 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
\r
98 #endif // BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
\r