1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/mpl/set/aux_/iterator.hpp Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,97 @@
1.4 +
1.5 +#ifndef BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
1.6 +#define BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
1.7 +
1.8 +// Copyright Aleksey Gurtovoy 2003-2004
1.9 +// Copyright David Abrahams 2003-2004
1.10 +//
1.11 +// Distributed under the Boost Software License, Version 1.0.
1.12 +// (See accompanying file LICENSE_1_0.txt or copy at
1.13 +// http://www.boost.org/LICENSE_1_0.txt)
1.14 +//
1.15 +// See http://www.boost.org/libs/mpl for documentation.
1.16 +
1.17 +// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/iterator.hpp,v $
1.18 +// $Date: 2005/06/18 22:03:09 $
1.19 +// $Revision: 1.4 $
1.20 +
1.21 +#include <boost/mpl/set/aux_/set0.hpp>
1.22 +#include <boost/mpl/has_key.hpp>
1.23 +#include <boost/mpl/iterator_tags.hpp>
1.24 +#include <boost/mpl/next.hpp>
1.25 +#include <boost/mpl/eval_if.hpp>
1.26 +#include <boost/mpl/if.hpp>
1.27 +#include <boost/mpl/identity.hpp>
1.28 +#include <boost/mpl/aux_/config/ctps.hpp>
1.29 +
1.30 +namespace boost { namespace mpl {
1.31 +
1.32 +// used by 's_iter_impl'
1.33 +template< typename Set, typename Tail > struct s_iter;
1.34 +
1.35 +template< typename Set, typename Tail > struct s_iter_impl
1.36 +{
1.37 + typedef Tail tail_;
1.38 + typedef forward_iterator_tag category;
1.39 + typedef typename Tail::item_::type type;
1.40 +
1.41 +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
1.42 + typedef typename eval_if<
1.43 + has_key< Set,typename Tail::next_::type >
1.44 + , identity< s_iter<Set,typename Tail::next_> >
1.45 + , next< s_iter<Set,typename Tail::next_> >
1.46 + >::type next;
1.47 +#endif
1.48 +};
1.49 +
1.50 +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
1.51 +
1.52 +template< typename Set, typename Tail >
1.53 +struct next< s_iter<Set,Tail> >
1.54 + : eval_if<
1.55 + has_key< Set,typename Tail::next_::type >
1.56 + , identity< s_iter<Set,typename Tail::next_> >
1.57 + , next< s_iter<Set,typename Tail::next_> >
1.58 + >
1.59 +{
1.60 +};
1.61 +
1.62 +template< typename Set >
1.63 +struct next< s_iter<Set,set0<> > >
1.64 +{
1.65 + typedef s_iter<Set,set0<> > type;
1.66 +};
1.67 +
1.68 +template< typename Set, typename Tail > struct s_iter
1.69 + : s_iter_impl<Set,Tail>
1.70 +{
1.71 +};
1.72 +
1.73 +template< typename Set > struct s_iter<Set, set0<> >
1.74 +{
1.75 + typedef forward_iterator_tag category;
1.76 +};
1.77 +
1.78 +#else
1.79 +
1.80 +template< typename Set >
1.81 +struct s_end_iter
1.82 +{
1.83 + typedef forward_iterator_tag category;
1.84 + typedef s_iter<Set,set0<> > next;
1.85 +};
1.86 +
1.87 +template< typename Set, typename Tail > struct s_iter
1.88 + : if_<
1.89 + is_same< Tail,set0<> >
1.90 + , s_end_iter<Set>
1.91 + , s_iter_impl<Set,Tail>
1.92 + >::type
1.93 +{
1.94 +};
1.95 +
1.96 +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
1.97 +
1.98 +}}
1.99 +
1.100 +#endif // BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED