1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/mpl/aux_/na_spec.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,175 @@
1.4 +
1.5 +#ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
1.6 +#define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
1.7 +
1.8 +// Copyright Aleksey Gurtovoy 2001-2004
1.9 +//
1.10 +// Distributed under the Boost Software License, Version 1.0.
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 +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/na_spec.hpp,v $
1.17 +// $Date: 2004/11/28 01:38:15 $
1.18 +// $Revision: 1.3 $
1.19 +
1.20 +#if !defined(BOOST_MPL_PREPROCESSING_MODE)
1.21 +# include <boost/mpl/lambda_fwd.hpp>
1.22 +# include <boost/mpl/int.hpp>
1.23 +# include <boost/mpl/bool.hpp>
1.24 +# include <boost/mpl/aux_/na.hpp>
1.25 +# include <boost/mpl/aux_/arity.hpp>
1.26 +# include <boost/mpl/aux_/template_arity_fwd.hpp>
1.27 +#endif
1.28 +
1.29 +#include <boost/mpl/aux_/preprocessor/params.hpp>
1.30 +#include <boost/mpl/aux_/preprocessor/enum.hpp>
1.31 +#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
1.32 +#include <boost/mpl/aux_/lambda_arity_param.hpp>
1.33 +#include <boost/mpl/aux_/config/dtp.hpp>
1.34 +#include <boost/mpl/aux_/config/eti.hpp>
1.35 +#include <boost/mpl/aux_/nttp_decl.hpp>
1.36 +#include <boost/mpl/aux_/config/ttp.hpp>
1.37 +#include <boost/mpl/aux_/config/lambda.hpp>
1.38 +#include <boost/mpl/aux_/config/overload_resolution.hpp>
1.39 +
1.40 +
1.41 +#define BOOST_MPL_AUX_NA_PARAMS(i) \
1.42 + BOOST_MPL_PP_ENUM(i, na) \
1.43 +/**/
1.44 +
1.45 +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
1.46 +# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
1.47 +namespace aux { \
1.48 +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \
1.49 +struct arity< \
1.50 + name< BOOST_MPL_AUX_NA_PARAMS(i) > \
1.51 + , N \
1.52 + > \
1.53 + : int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \
1.54 +{ \
1.55 +}; \
1.56 +} \
1.57 +/**/
1.58 +#else
1.59 +# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/
1.60 +#endif
1.61 +
1.62 +#define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
1.63 +template<> \
1.64 +struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \
1.65 +{ \
1.66 + template< \
1.67 + BOOST_MPL_PP_PARAMS(i, typename T) \
1.68 + BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
1.69 + > \
1.70 + struct apply \
1.71 + : name< BOOST_MPL_PP_PARAMS(i, T) > \
1.72 + { \
1.73 + }; \
1.74 +}; \
1.75 +/**/
1.76 +
1.77 +#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
1.78 +# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
1.79 +template<> \
1.80 +struct lambda< \
1.81 + name< BOOST_MPL_AUX_NA_PARAMS(i) > \
1.82 + , void_ \
1.83 + , true_ \
1.84 + > \
1.85 +{ \
1.86 + typedef false_ is_le; \
1.87 + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
1.88 +}; \
1.89 +template<> \
1.90 +struct lambda< \
1.91 + name< BOOST_MPL_AUX_NA_PARAMS(i) > \
1.92 + , void_ \
1.93 + , false_ \
1.94 + > \
1.95 +{ \
1.96 + typedef false_ is_le; \
1.97 + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
1.98 +}; \
1.99 +/**/
1.100 +#else
1.101 +# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
1.102 +template< typename Tag > \
1.103 +struct lambda< \
1.104 + name< BOOST_MPL_AUX_NA_PARAMS(i) > \
1.105 + , Tag \
1.106 + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \
1.107 + > \
1.108 +{ \
1.109 + typedef false_ is_le; \
1.110 + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > result_; \
1.111 + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
1.112 +}; \
1.113 +/**/
1.114 +#endif
1.115 +
1.116 +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \
1.117 + || defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \
1.118 + && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION)
1.119 +# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \
1.120 +namespace aux { \
1.121 +template< BOOST_MPL_PP_PARAMS(j, typename T) > \
1.122 +struct template_arity< \
1.123 + name< BOOST_MPL_PP_PARAMS(j, T) > \
1.124 + > \
1.125 + : int_<j> \
1.126 +{ \
1.127 +}; \
1.128 +\
1.129 +template<> \
1.130 +struct template_arity< \
1.131 + name< BOOST_MPL_PP_ENUM(i, na) > \
1.132 + > \
1.133 + : int_<-1> \
1.134 +{ \
1.135 +}; \
1.136 +} \
1.137 +/**/
1.138 +#else
1.139 +# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/
1.140 +#endif
1.141 +
1.142 +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
1.143 +# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
1.144 +template<> \
1.145 +struct name< BOOST_MPL_PP_ENUM(i, int) > \
1.146 +{ \
1.147 + typedef int type; \
1.148 + enum { value = 0 }; \
1.149 +}; \
1.150 +/**/
1.151 +#else
1.152 +# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/
1.153 +#endif
1.154 +
1.155 +#define BOOST_MPL_AUX_NA_PARAM(param) param = na
1.156 +
1.157 +#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1.158 +BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
1.159 +BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
1.160 +BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
1.161 +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \
1.162 +/**/
1.163 +
1.164 +#define BOOST_MPL_AUX_NA_SPEC(i, name) \
1.165 +BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1.166 +BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
1.167 +/**/
1.168 +
1.169 +#define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \
1.170 +BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
1.171 +BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
1.172 +BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
1.173 +BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
1.174 +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \
1.175 +/**/
1.176 +
1.177 +
1.178 +#endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED