1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/mpl/arg.hpp Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,131 @@
1.4 +
1.5 +#if !defined(BOOST_PP_IS_ITERATING)
1.6 +
1.7 +///// header body
1.8 +
1.9 +#ifndef BOOST_MPL_ARG_HPP_INCLUDED
1.10 +#define BOOST_MPL_ARG_HPP_INCLUDED
1.11 +
1.12 +// Copyright Peter Dimov 2001-2002
1.13 +// Copyright Aleksey Gurtovoy 2001-2004
1.14 +//
1.15 +// Distributed under the Boost Software License, Version 1.0.
1.16 +// (See accompanying file LICENSE_1_0.txt or copy at
1.17 +// http://www.boost.org/LICENSE_1_0.txt)
1.18 +//
1.19 +// See http://www.boost.org/libs/mpl for documentation.
1.20 +
1.21 +// $Source: /cvsroot/boost/boost/boost/mpl/arg.hpp,v $
1.22 +// $Date: 2004/09/21 13:48:07 $
1.23 +// $Revision: 1.12 $
1.24 +
1.25 +#if !defined(BOOST_MPL_PREPROCESSING_MODE)
1.26 +# include <boost/mpl/arg_fwd.hpp>
1.27 +# include <boost/mpl/aux_/na.hpp>
1.28 +# include <boost/mpl/aux_/na_assert.hpp>
1.29 +# include <boost/mpl/aux_/arity_spec.hpp>
1.30 +# include <boost/mpl/aux_/arg_typedef.hpp>
1.31 +#endif
1.32 +
1.33 +#include <boost/mpl/aux_/config/static_constant.hpp>
1.34 +#include <boost/mpl/aux_/config/use_preprocessed.hpp>
1.35 +
1.36 +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
1.37 + && !defined(BOOST_MPL_PREPROCESSING_MODE)
1.38 +
1.39 +# define BOOST_MPL_PREPROCESSED_HEADER arg.hpp
1.40 +# include <boost/mpl/aux_/include_preprocessed.hpp>
1.41 +
1.42 +#else
1.43 +
1.44 +# include <boost/mpl/limits/arity.hpp>
1.45 +# include <boost/mpl/aux_/preprocessor/default_params.hpp>
1.46 +# include <boost/mpl/aux_/preprocessor/params.hpp>
1.47 +# include <boost/mpl/aux_/config/lambda.hpp>
1.48 +# include <boost/mpl/aux_/config/dtp.hpp>
1.49 +# include <boost/mpl/aux_/nttp_decl.hpp>
1.50 +
1.51 +# include <boost/preprocessor/iterate.hpp>
1.52 +# include <boost/preprocessor/inc.hpp>
1.53 +# include <boost/preprocessor/cat.hpp>
1.54 +
1.55 +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
1.56 +
1.57 +// local macro, #undef-ined at the end of the header
1.58 +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
1.59 +# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
1.60 + BOOST_MPL_PP_DEFAULT_PARAMS( \
1.61 + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
1.62 + , param \
1.63 + , value \
1.64 + ) \
1.65 + /**/
1.66 +#else
1.67 +# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
1.68 + BOOST_MPL_PP_PARAMS( \
1.69 + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
1.70 + , param \
1.71 + ) \
1.72 + /**/
1.73 +#endif
1.74 +
1.75 +#define BOOST_PP_ITERATION_PARAMS_1 \
1.76 + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/arg.hpp>))
1.77 +#include BOOST_PP_ITERATE()
1.78 +
1.79 +
1.80 +# undef AUX778076_ARG_N_DEFAULT_PARAMS
1.81 +
1.82 +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg)
1.83 +
1.84 +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
1.85 +
1.86 +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
1.87 +#endif // BOOST_MPL_ARG_HPP_INCLUDED
1.88 +
1.89 +///// iteration
1.90 +
1.91 +#else
1.92 +#define i_ BOOST_PP_FRAME_ITERATION(1)
1.93 +
1.94 +#if i_ > 0
1.95 +
1.96 +template<> struct arg<i_>
1.97 +{
1.98 + BOOST_STATIC_CONSTANT(int, value = i_);
1.99 + typedef arg<BOOST_PP_INC(i_)> next;
1.100 + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
1.101 + BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
1.102 +
1.103 + template<
1.104 + AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
1.105 + >
1.106 + struct apply
1.107 + {
1.108 + typedef BOOST_PP_CAT(U,i_) type;
1.109 + BOOST_MPL_AUX_ASSERT_NOT_NA(type);
1.110 + };
1.111 +};
1.112 +
1.113 +#else
1.114 +
1.115 +template<> struct arg<-1>
1.116 +{
1.117 + BOOST_STATIC_CONSTANT(int, value = -1);
1.118 + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
1.119 + BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
1.120 +
1.121 + template<
1.122 + AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
1.123 + >
1.124 + struct apply
1.125 + {
1.126 + typedef U1 type;
1.127 + BOOST_MPL_AUX_ASSERT_NOT_NA(type);
1.128 + };
1.129 +};
1.130 +
1.131 +#endif // i_ > 0
1.132 +
1.133 +#undef i_
1.134 +#endif // BOOST_PP_IS_ITERATING