diff -r e1b950c65cb4 -r 837f303aceeb epoc32/include/stdapis/boost/mpl/aux_/advance_forward.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/advance_forward.hpp Wed Mar 31 12:27:01 2010 +0100 +++ b/epoc32/include/stdapis/boost/mpl/aux_/advance_forward.hpp Wed Mar 31 12:33:34 2010 +0100 @@ -1,3 +1,10 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED +#define BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // @@ -5,88 +12,60 @@ // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // +// See http://www.boost.org/libs/mpl for documentation. -// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header -// -- DO NOT modify by hand! +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/advance_forward.hpp,v $ +// $Date: 2004/09/02 15:40:43 $ +// $Revision: 1.9 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER advance_forward.hpp +# include + +#else + +# include +# include +# include + +# include +# include +# include namespace boost { namespace mpl { namespace aux { -template< long N > struct advance_forward; -template<> -struct advance_forward<0> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef iter0 type; - }; -}; +// forward declaration +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward; -template<> -struct advance_forward<1> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next::type iter1; - typedef iter1 type; - }; -}; +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) +# include BOOST_PP_ITERATE() -template<> -struct advance_forward<2> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next::type iter1; - typedef typename next::type iter2; - typedef iter2 type; - }; -}; - -template<> -struct advance_forward<3> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next::type iter1; - typedef typename next::type iter2; - typedef typename next::type iter3; - typedef iter3 type; - }; -}; - -template<> -struct advance_forward<4> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next::type iter1; - typedef typename next::type iter2; - typedef typename next::type iter3; - typedef typename next::type iter4; - typedef iter4 type; - }; -}; - -template< long N > +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< - advance_forward<4> + advance_forward , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( - (N - 4) < 0 + (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 - : N - 4 + : N - BOOST_MPL_LIMIT_UNROLLING )> , chunk_result_ >::type type; @@ -95,3 +74,50 @@ }}} +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED + +///// iteration, depth == 1 + +#elif BOOST_PP_ITERATION_DEPTH() == 1 +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template<> +struct advance_forward< BOOST_PP_FRAME_ITERATION(1) > +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + +#if i_ > 0 +# define BOOST_PP_ITERATION_PARAMS_2 \ + (3,(1, i_, )) +# include BOOST_PP_ITERATE() +#endif + typedef BOOST_PP_CAT(iter,i_) type; + }; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround + template<> struct apply + { + typedef int type; + }; +#endif +}; + +#undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +# define AUX778076_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2))) +# define AUX778076_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2)) + + typedef typename next::type AUX778076_ITER_1; + +# undef AUX778076_ITER_1 +# undef AUX778076_ITER_0 + +#endif // BOOST_PP_IS_ITERATING