epoc32/include/stdapis/boost/mpl/apply_wrap.hpp
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/stdapis/boost/mpl/apply_wrap.hpp	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/stdapis/boost/mpl/apply_wrap.hpp	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,3 +1,10 @@
     1.4 +
     1.5 +#if !defined(BOOST_PP_IS_ITERATING)
     1.6 +
     1.7 +///// header body
     1.8 +
     1.9 +#ifndef BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
    1.10 +#define BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
    1.11  
    1.12  // Copyright Aleksey Gurtovoy 2000-2004
    1.13  //
    1.14 @@ -5,80 +12,189 @@
    1.15  // (See accompanying file LICENSE_1_0.txt or copy at 
    1.16  // http://www.boost.org/LICENSE_1_0.txt)
    1.17  //
    1.18 +// See http://www.boost.org/libs/mpl for documentation.
    1.19  
    1.20 -// Preprocessed version of "boost/mpl/apply_wrap.hpp" header
    1.21 -// -- DO NOT modify by hand!
    1.22 +// $Source: /cvsroot/boost/boost/boost/mpl/apply_wrap.hpp,v $
    1.23 +// $Date: 2004/09/03 15:56:55 $
    1.24 +// $Revision: 1.3 $
    1.25 +
    1.26 +#if !defined(BOOST_MPL_PREPROCESSING_MODE)
    1.27 +#   include <boost/mpl/aux_/arity.hpp>
    1.28 +#   include <boost/mpl/aux_/has_apply.hpp>
    1.29 +#   include <boost/mpl/aux_/na.hpp>
    1.30 +#   include <boost/mpl/aux_/msvc_never_true.hpp>
    1.31 +#endif
    1.32 +
    1.33 +#include <boost/mpl/aux_/config/use_preprocessed.hpp>
    1.34 +
    1.35 +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
    1.36 +    && !defined(BOOST_MPL_PREPROCESSING_MODE)
    1.37 +
    1.38 +#   define BOOST_MPL_PREPROCESSED_HEADER apply_wrap.hpp
    1.39 +#   include <boost/mpl/aux_/include_preprocessed.hpp>
    1.40 +
    1.41 +#else
    1.42 +
    1.43 +#   include <boost/mpl/limits/arity.hpp>
    1.44 +#   include <boost/mpl/aux_/preprocessor/params.hpp>
    1.45 +#   include <boost/mpl/aux_/preprocessor/enum.hpp>
    1.46 +#   include <boost/mpl/aux_/preprocessor/add.hpp>
    1.47 +#   include <boost/mpl/aux_/config/dtp.hpp>
    1.48 +#   include <boost/mpl/aux_/config/eti.hpp>
    1.49 +#   include <boost/mpl/aux_/config/ctps.hpp>
    1.50 +#   include <boost/mpl/aux_/config/msvc.hpp>
    1.51 +#   include <boost/mpl/aux_/config/workaround.hpp>
    1.52 +
    1.53 +#   include <boost/preprocessor/comma_if.hpp>
    1.54 +#   include <boost/preprocessor/logical/and.hpp>
    1.55 +#   include <boost/preprocessor/inc.hpp>
    1.56 +#   include <boost/preprocessor/iterate.hpp>
    1.57 +
    1.58  
    1.59  namespace boost { namespace mpl {
    1.60  
    1.61 +// local macros, #undef-ined at the end of the header
    1.62 +#   define AUX778076_APPLY_WRAP_PARAMS(n, param) \
    1.63 +    BOOST_MPL_PP_PARAMS(n, param) \
    1.64 +    /**/
    1.65 +
    1.66 +#   define AUX778076_APPLY_WRAP_SPEC_PARAMS(n, param) \
    1.67 +    BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \
    1.68 +    /**/
    1.69 +
    1.70 +
    1.71 +#define BOOST_PP_ITERATION_PARAMS_1 \
    1.72 +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_wrap.hpp>))
    1.73 +#include BOOST_PP_ITERATE()
    1.74 +
    1.75 +
    1.76 +#   undef AUX778076_APPLY_WRAP_SPEC_PARAMS
    1.77 +#   undef AUX778076_APPLY_WRAP_PARAMS
    1.78 +
    1.79 +}}
    1.80 +
    1.81 +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
    1.82 +#endif // BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
    1.83 +
    1.84 +///// iteration, depth == 1
    1.85 +
    1.86 +#elif BOOST_PP_ITERATION_DEPTH() == 1
    1.87 +
    1.88 +#   define i_ BOOST_PP_FRAME_ITERATION(1)
    1.89 +
    1.90 +#   if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
    1.91 +// MSVC version
    1.92 +
    1.93 +#define AUX778076_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i_)
    1.94 +#define AUX778076_MSVC_DTW_ORIGINAL_NAME apply
    1.95 +#define AUX778076_MSVC_DTW_ARITY i_
    1.96 +#include <boost/mpl/aux_/msvc_dtw.hpp>
    1.97 +
    1.98  template<
    1.99 -      typename F
   1.100 +      typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
   1.101 +    >
   1.102 +struct BOOST_PP_CAT(apply_wrap,i_)
   1.103 +{
   1.104 +    // Metafunction forwarding confuses vc6
   1.105 +    typedef typename BOOST_PP_CAT(msvc_apply,i_)<F>::template result_<
   1.106 +          AUX778076_APPLY_WRAP_PARAMS(i_, T)
   1.107 +        >::type type;
   1.108 +};
   1.109  
   1.110 -    , typename has_apply_ = typename aux::has_apply<F>::type
   1.111 +#   elif defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
   1.112 +// MWCW/Borland version
   1.113  
   1.114 +template<
   1.115 +      int N, typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
   1.116      >
   1.117 -struct apply_wrap0
   1.118 +struct BOOST_PP_CAT(apply_wrap_impl,i_);
   1.119  
   1.120 -    : F::template apply<  >
   1.121 +#define BOOST_PP_ITERATION_PARAMS_2 \
   1.122 +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY - i_, <boost/mpl/apply_wrap.hpp>))
   1.123 +#include BOOST_PP_ITERATE()
   1.124 +
   1.125 +template<
   1.126 +      typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
   1.127 +    >
   1.128 +struct BOOST_PP_CAT(apply_wrap,i_)
   1.129 +    : BOOST_PP_CAT(apply_wrap_impl,i_)<
   1.130 +          ::boost::mpl::aux::arity<F,i_>::value
   1.131 +        , F
   1.132 +        BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
   1.133 +        >::type
   1.134  {
   1.135  };
   1.136  
   1.137 +#   else
   1.138 +// ISO98 C++, with minor concession to vc7
   1.139 +
   1.140 +template<
   1.141 +      typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
   1.142 +#if i_ == 0
   1.143 +    , typename has_apply_ = typename aux::has_apply<F>::type
   1.144 +#endif
   1.145 +    >
   1.146 +struct BOOST_PP_CAT(apply_wrap,i_)
   1.147 +// metafunction forwarding confuses MSVC 7.0
   1.148 +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1300)
   1.149 +    : F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) >
   1.150 +{
   1.151 +#else
   1.152 +{    
   1.153 +    typedef typename F::template apply<
   1.154 +         AUX778076_APPLY_WRAP_PARAMS(i_, T)
   1.155 +        >::type type;
   1.156 +#endif
   1.157 +};
   1.158 +
   1.159 +#if i_ == 0 && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
   1.160  template< typename F >
   1.161 -struct apply_wrap0< F,true_ >
   1.162 +struct BOOST_PP_CAT(apply_wrap,i_)<F,true_>
   1.163      : F::apply
   1.164  {
   1.165  };
   1.166 +#endif
   1.167 +
   1.168 +#   endif // workarounds
   1.169 +
   1.170 +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
   1.171 +/// workaround for ETI bug
   1.172 +template<>
   1.173 +struct BOOST_PP_CAT(apply_wrap,i_)<AUX778076_APPLY_WRAP_SPEC_PARAMS(i_, int)>
   1.174 +{
   1.175 +    typedef int type;
   1.176 +};
   1.177 +#endif
   1.178 +
   1.179 +#   undef i_
   1.180 +
   1.181 +///// iteration, depth == 2
   1.182 +
   1.183 +#elif BOOST_PP_ITERATION_DEPTH() == 2
   1.184 +
   1.185 +#   define j_ BOOST_PP_FRAME_ITERATION(2)
   1.186  
   1.187  template<
   1.188 -      typename F, typename T1
   1.189 -
   1.190 +      typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
   1.191      >
   1.192 -struct apply_wrap1
   1.193 -
   1.194 -    : F::template apply<T1>
   1.195 +struct BOOST_PP_CAT(apply_wrap_impl,i_)<
   1.196 +          BOOST_MPL_PP_ADD(i_, j_)
   1.197 +        , F
   1.198 +        BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
   1.199 +        >
   1.200  {
   1.201 +    typedef typename F::template apply<
   1.202 +          AUX778076_APPLY_WRAP_PARAMS(i_, T)
   1.203 +#if i_ == 0 && j_ == 0
   1.204 +/// since the defaults are "lost", we have to pass *something* even for nullary
   1.205 +/// metafunction classes
   1.206 +        na
   1.207 +#else
   1.208 +        BOOST_PP_COMMA_IF(BOOST_PP_AND(i_, j_)) BOOST_MPL_PP_ENUM(j_, na)
   1.209 +#endif
   1.210 +        > type;
   1.211  };
   1.212  
   1.213 -template<
   1.214 -      typename F, typename T1, typename T2
   1.215 +#   undef j_
   1.216  
   1.217 -    >
   1.218 -struct apply_wrap2
   1.219 -
   1.220 -    : F::template apply< T1,T2 >
   1.221 -{
   1.222 -};
   1.223 -
   1.224 -template<
   1.225 -      typename F, typename T1, typename T2, typename T3
   1.226 -
   1.227 -    >
   1.228 -struct apply_wrap3
   1.229 -
   1.230 -    : F::template apply< T1,T2,T3 >
   1.231 -{
   1.232 -};
   1.233 -
   1.234 -template<
   1.235 -      typename F, typename T1, typename T2, typename T3, typename T4
   1.236 -
   1.237 -    >
   1.238 -struct apply_wrap4
   1.239 -
   1.240 -    : F::template apply< T1,T2,T3,T4 >
   1.241 -{
   1.242 -};
   1.243 -
   1.244 -template<
   1.245 -      typename F, typename T1, typename T2, typename T3, typename T4
   1.246 -    , typename T5
   1.247 -
   1.248 -    >
   1.249 -struct apply_wrap5
   1.250 -
   1.251 -    : F::template apply< T1,T2,T3,T4,T5 >
   1.252 -{
   1.253 -};
   1.254 -
   1.255 -}}
   1.256 -
   1.257 +#endif // BOOST_PP_IS_ITERATING