1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/quote.hpp Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,140 @@
1.4 +
1.5 +#if !defined(BOOST_PP_IS_ITERATING)
1.6 +
1.7 +///// header body
1.8 +
1.9 +#ifndef BOOST_MPL_QUOTE_HPP_INCLUDED
1.10 +#define BOOST_MPL_QUOTE_HPP_INCLUDED
1.11 +
1.12 +// Copyright Aleksey Gurtovoy 2000-2004
1.13 +//
1.14 +// Distributed under the Boost Software License, Version 1.0.
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 +// $Source: /cvsroot/boost/boost/boost/mpl/quote.hpp,v $
1.21 +// $Date: 2006/05/03 03:27:58 $
1.22 +// $Revision: 1.5.14.2 $
1.23 +
1.24 +#if !defined(BOOST_MPL_PREPROCESSING_MODE)
1.25 +# include <boost/mpl/void.hpp>
1.26 +# include <boost/mpl/aux_/has_type.hpp>
1.27 +#endif
1.28 +
1.29 +#include <boost/mpl/aux_/config/ttp.hpp>
1.30 +
1.31 +#if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS)
1.32 +# define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE
1.33 +#endif
1.34 +
1.35 +#if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \
1.36 + && defined(BOOST_MPL_CFG_NO_HAS_XXX)
1.37 +# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS
1.38 +#endif
1.39 +
1.40 +#include <boost/mpl/aux_/config/use_preprocessed.hpp>
1.41 +
1.42 +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
1.43 + && !defined(BOOST_MPL_PREPROCESSING_MODE)
1.44 +
1.45 +# define BOOST_MPL_PREPROCESSED_HEADER quote.hpp
1.46 +# include <boost/mpl/aux_/include_preprocessed.hpp>
1.47 +
1.48 +#else
1.49 +
1.50 +# include <boost/mpl/limits/arity.hpp>
1.51 +# include <boost/mpl/aux_/preprocessor/params.hpp>
1.52 +# include <boost/mpl/aux_/config/ctps.hpp>
1.53 +# include <boost/mpl/aux_/config/workaround.hpp>
1.54 +
1.55 +# include <boost/preprocessor/iterate.hpp>
1.56 +# include <boost/preprocessor/cat.hpp>
1.57 +
1.58 +#if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE)
1.59 +
1.60 +namespace boost { namespace mpl {
1.61 +
1.62 +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
1.63 +
1.64 +template< typename T, bool has_type_ >
1.65 +struct quote_impl
1.66 +// GCC has a problem with metafunction forwarding when T is a
1.67 +// specialization of a template called 'type'.
1.68 +# if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \
1.69 + && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \
1.70 + && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(2))
1.71 +{
1.72 + typedef typename T::type type;
1.73 +};
1.74 +# else
1.75 + : T
1.76 +{
1.77 +};
1.78 +# endif
1.79 +
1.80 +template< typename T >
1.81 +struct quote_impl<T,false>
1.82 +{
1.83 + typedef T type;
1.84 +};
1.85 +
1.86 +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
1.87 +
1.88 +template< bool > struct quote_impl
1.89 +{
1.90 + template< typename T > struct result_
1.91 + : T
1.92 + {
1.93 + };
1.94 +};
1.95 +
1.96 +template<> struct quote_impl<false>
1.97 +{
1.98 + template< typename T > struct result_
1.99 + {
1.100 + typedef T type;
1.101 + };
1.102 +};
1.103 +
1.104 +#endif
1.105 +
1.106 +#define BOOST_PP_ITERATION_PARAMS_1 \
1.107 + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/quote.hpp>))
1.108 +#include BOOST_PP_ITERATE()
1.109 +
1.110 +}}
1.111 +
1.112 +#endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE
1.113 +
1.114 +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
1.115 +#endif // BOOST_MPL_QUOTE_HPP_INCLUDED
1.116 +
1.117 +///// iteration
1.118 +
1.119 +#else
1.120 +#define i_ BOOST_PP_FRAME_ITERATION(1)
1.121 +
1.122 +template<
1.123 + template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F
1.124 + , typename Tag = void_
1.125 + >
1.126 +struct BOOST_PP_CAT(quote,i_)
1.127 +{
1.128 + template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply
1.129 +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
1.130 + : quote_impl<
1.131 + F< BOOST_MPL_PP_PARAMS(i_, U) >
1.132 + , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value
1.133 + >
1.134 +#else
1.135 + : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value >
1.136 + ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > >
1.137 +#endif
1.138 + {
1.139 + };
1.140 +};
1.141 +
1.142 +#undef i_
1.143 +#endif // BOOST_PP_IS_ITERATING