Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:40

0001 
0002 #ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
0003 #define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2000-2004
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. 
0008 // (See accompanying file LICENSE_1_0.txt or copy at 
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // See http://www.boost.org/libs/mpl for documentation.
0012 
0013 // $Id$
0014 // $Date$
0015 // $Revision$
0016 
0017 #include <boost/mpl/iterator_tags.hpp>
0018 #include <boost/mpl/next_prior.hpp>
0019 #include <boost/mpl/deref.hpp>
0020 #include <boost/mpl/list/aux_/item.hpp>
0021 #include <boost/mpl/aux_/na.hpp>
0022 #include <boost/mpl/aux_/lambda_spec.hpp>
0023 #include <boost/mpl/aux_/config/ctps.hpp>
0024 
0025 namespace boost { namespace mpl {
0026 
0027 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0028 
0029 template< typename Node >
0030 struct l_iter
0031 {
0032     typedef aux::l_iter_tag tag;
0033     typedef forward_iterator_tag category;
0034 };
0035 
0036 template< typename Node >
0037 struct deref< l_iter<Node> >
0038 {
0039     typedef typename Node::item type;
0040 };
0041 
0042 template< typename Node >
0043 struct next< l_iter<Node> >
0044 {
0045     typedef l_iter< typename Node::next > type;
0046 };
0047 
0048 #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
0049 
0050 template< typename Node >
0051 struct l_iter
0052 {
0053     typedef aux::l_iter_tag tag;
0054     typedef forward_iterator_tag category;
0055     typedef typename Node::item type;
0056     typedef l_iter< typename mpl::next<Node>::type > next;
0057 };
0058 
0059 #endif
0060 
0061 
0062 template<> struct l_iter<l_end>
0063 {
0064     typedef aux::l_iter_tag tag;
0065     typedef forward_iterator_tag category;
0066 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0067     typedef na type;
0068     typedef l_iter next;
0069 #endif
0070 };
0071 
0072 BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter)
0073 
0074 }}
0075 
0076 #endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED