epoc32/include/stdapis/boost/mpl/aux_/iter_fold_impl.hpp
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/stdapis/boost/mpl/aux_/iter_fold_impl.hpp	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/stdapis/boost/mpl/aux_/iter_fold_impl.hpp	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,3 +1,6 @@
     1.4 +
     1.5 +#ifndef BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED
     1.6 +#define BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED
     1.7  
     1.8  // Copyright Aleksey Gurtovoy 2000-2004
     1.9  //
    1.10 @@ -5,176 +8,35 @@
    1.11  // (See accompanying file LICENSE_1_0.txt or copy at 
    1.12  // http://www.boost.org/LICENSE_1_0.txt)
    1.13  //
    1.14 +// See http://www.boost.org/libs/mpl for documentation.
    1.15  
    1.16 -// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
    1.17 -// -- DO NOT modify by hand!
    1.18 +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/iter_fold_impl.hpp,v $
    1.19 +// $Date: 2004/09/02 15:40:43 $
    1.20 +// $Revision: 1.5 $
    1.21  
    1.22 -namespace boost { namespace mpl { namespace aux {
    1.23 +#if !defined(BOOST_MPL_PREPROCESSING_MODE)
    1.24 +#   include <boost/mpl/next_prior.hpp>
    1.25 +#   include <boost/mpl/apply.hpp>
    1.26 +#   include <boost/mpl/aux_/config/ctps.hpp>
    1.27 +#   if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
    1.28 +#       include <boost/mpl/if.hpp>
    1.29 +#       include <boost/type_traits/is_same.hpp>
    1.30 +#   endif
    1.31 +#endif
    1.32  
    1.33 -/// forward declaration
    1.34 +#include <boost/mpl/aux_/config/use_preprocessed.hpp>
    1.35  
    1.36 -template<
    1.37 -      int N
    1.38 -    , typename First
    1.39 -    , typename Last
    1.40 -    , typename State
    1.41 -    , typename ForwardOp
    1.42 -    >
    1.43 -struct iter_fold_impl;
    1.44 +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
    1.45 +    && !defined(BOOST_MPL_PREPROCESSING_MODE)
    1.46  
    1.47 -template<
    1.48 -      typename First
    1.49 -    , typename Last
    1.50 -    , typename State
    1.51 -    , typename ForwardOp
    1.52 -    >
    1.53 -struct iter_fold_impl< 0,First,Last,State,ForwardOp >
    1.54 -{
    1.55 -    typedef First iter0;
    1.56 -    typedef State state0;
    1.57 -    typedef state0 state;
    1.58 -    typedef iter0 iterator;
    1.59 -};
    1.60 +#   define BOOST_MPL_PREPROCESSED_HEADER iter_fold_impl.hpp
    1.61 +#   include <boost/mpl/aux_/include_preprocessed.hpp>
    1.62  
    1.63 -template<
    1.64 -      typename First
    1.65 -    , typename Last
    1.66 -    , typename State
    1.67 -    , typename ForwardOp
    1.68 -    >
    1.69 -struct iter_fold_impl< 1,First,Last,State,ForwardOp >
    1.70 -{
    1.71 -    typedef First iter0;
    1.72 -    typedef State state0;
    1.73 -    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
    1.74 -    typedef typename mpl::next<iter0>::type iter1;
    1.75 -    
    1.76 +#else
    1.77  
    1.78 -    typedef state1 state;
    1.79 -    typedef iter1 iterator;
    1.80 -};
    1.81 +#   define AUX778076_FOLD_IMPL_OP(iter) iter
    1.82 +#   define AUX778076_FOLD_IMPL_NAME_PREFIX iter_fold
    1.83 +#   include <boost/mpl/aux_/fold_impl_body.hpp>
    1.84  
    1.85 -template<
    1.86 -      typename First
    1.87 -    , typename Last
    1.88 -    , typename State
    1.89 -    , typename ForwardOp
    1.90 -    >
    1.91 -struct iter_fold_impl< 2,First,Last,State,ForwardOp >
    1.92 -{
    1.93 -    typedef First iter0;
    1.94 -    typedef State state0;
    1.95 -    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
    1.96 -    typedef typename mpl::next<iter0>::type iter1;
    1.97 -    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
    1.98 -    typedef typename mpl::next<iter1>::type iter2;
    1.99 -    
   1.100 -
   1.101 -    typedef state2 state;
   1.102 -    typedef iter2 iterator;
   1.103 -};
   1.104 -
   1.105 -template<
   1.106 -      typename First
   1.107 -    , typename Last
   1.108 -    , typename State
   1.109 -    , typename ForwardOp
   1.110 -    >
   1.111 -struct iter_fold_impl< 3,First,Last,State,ForwardOp >
   1.112 -{
   1.113 -    typedef First iter0;
   1.114 -    typedef State state0;
   1.115 -    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
   1.116 -    typedef typename mpl::next<iter0>::type iter1;
   1.117 -    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
   1.118 -    typedef typename mpl::next<iter1>::type iter2;
   1.119 -    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
   1.120 -    typedef typename mpl::next<iter2>::type iter3;
   1.121 -    
   1.122 -
   1.123 -    typedef state3 state;
   1.124 -    typedef iter3 iterator;
   1.125 -};
   1.126 -
   1.127 -template<
   1.128 -      typename First
   1.129 -    , typename Last
   1.130 -    , typename State
   1.131 -    , typename ForwardOp
   1.132 -    >
   1.133 -struct iter_fold_impl< 4,First,Last,State,ForwardOp >
   1.134 -{
   1.135 -    typedef First iter0;
   1.136 -    typedef State state0;
   1.137 -    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
   1.138 -    typedef typename mpl::next<iter0>::type iter1;
   1.139 -    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
   1.140 -    typedef typename mpl::next<iter1>::type iter2;
   1.141 -    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
   1.142 -    typedef typename mpl::next<iter2>::type iter3;
   1.143 -    typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
   1.144 -    typedef typename mpl::next<iter3>::type iter4;
   1.145 -    
   1.146 -
   1.147 -    typedef state4 state;
   1.148 -    typedef iter4 iterator;
   1.149 -};
   1.150 -
   1.151 -template<
   1.152 -      int N
   1.153 -    , typename First
   1.154 -    , typename Last
   1.155 -    , typename State
   1.156 -    , typename ForwardOp
   1.157 -    >
   1.158 -struct iter_fold_impl
   1.159 -{
   1.160 -    typedef iter_fold_impl<
   1.161 -          4
   1.162 -        , First
   1.163 -        , Last
   1.164 -        , State
   1.165 -        , ForwardOp
   1.166 -        > chunk_;
   1.167 -
   1.168 -    typedef iter_fold_impl<
   1.169 -          ( (N - 4) < 0 ? 0 : N - 4 )
   1.170 -        , typename chunk_::iterator
   1.171 -        , Last
   1.172 -        , typename chunk_::state
   1.173 -        , ForwardOp
   1.174 -        > res_;
   1.175 -
   1.176 -    typedef typename res_::state state;
   1.177 -    typedef typename res_::iterator iterator;
   1.178 -};
   1.179 -
   1.180 -template<
   1.181 -      typename First
   1.182 -    , typename Last
   1.183 -    , typename State
   1.184 -    , typename ForwardOp
   1.185 -    >
   1.186 -struct iter_fold_impl< -1,First,Last,State,ForwardOp >
   1.187 -    : iter_fold_impl<
   1.188 -          -1
   1.189 -        , typename mpl::next<First>::type
   1.190 -        , Last
   1.191 -        , typename apply2< ForwardOp,State,First >::type
   1.192 -        , ForwardOp
   1.193 -        >
   1.194 -{
   1.195 -};
   1.196 -
   1.197 -template<
   1.198 -      typename Last
   1.199 -    , typename State
   1.200 -    , typename ForwardOp
   1.201 -    >
   1.202 -struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
   1.203 -{
   1.204 -    typedef State state;
   1.205 -    typedef Last iterator;
   1.206 -};
   1.207 -
   1.208 -}}}
   1.209 +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
   1.210 +#endif // BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED