2 #if !defined(BOOST_PP_IS_ITERATING)
6 #ifndef BOOST_MPL_QUOTE_HPP_INCLUDED
7 #define BOOST_MPL_QUOTE_HPP_INCLUDED
9 // Copyright Aleksey Gurtovoy 2000-2004
11 // Distributed under the Boost Software License, Version 1.0.
12 // (See accompanying file LICENSE_1_0.txt or copy at
13 // http://www.boost.org/LICENSE_1_0.txt)
15 // See http://www.boost.org/libs/mpl for documentation.
17 // $Source: /cvsroot/boost/boost/boost/mpl/quote.hpp,v $
18 // $Date: 2004/09/02 15:40:42 $
21 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
22 # include <boost/mpl/void.hpp>
23 # include <boost/mpl/aux_/has_type.hpp>
26 #include <boost/mpl/aux_/config/ttp.hpp>
28 #if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS)
29 # define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE
32 #if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \
33 && defined(BOOST_MPL_CFG_NO_HAS_XXX)
34 # define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS
37 #include <boost/mpl/aux_/config/use_preprocessed.hpp>
39 #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
40 && !defined(BOOST_MPL_PREPROCESSING_MODE)
42 # define BOOST_MPL_PREPROCESSED_HEADER quote.hpp
43 # include <boost/mpl/aux_/include_preprocessed.hpp>
47 # include <boost/mpl/limits/arity.hpp>
48 # include <boost/mpl/aux_/preprocessor/params.hpp>
49 # include <boost/mpl/aux_/config/ctps.hpp>
50 # include <boost/mpl/aux_/config/workaround.hpp>
52 # include <boost/preprocessor/iterate.hpp>
53 # include <boost/preprocessor/cat.hpp>
55 #if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE)
57 namespace boost { namespace mpl {
59 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
61 template< typename T, bool has_type_ >
67 template< typename T >
68 struct quote_impl<T,false>
73 #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
75 template< bool > struct quote_impl
77 template< typename T > struct result_
83 template<> struct quote_impl<false>
85 template< typename T > struct result_
93 #define BOOST_PP_ITERATION_PARAMS_1 \
94 (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/quote.hpp>))
95 #include BOOST_PP_ITERATE()
99 #endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE
101 #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
102 #endif // BOOST_MPL_QUOTE_HPP_INCLUDED
107 #define i_ BOOST_PP_FRAME_ITERATION(1)
110 template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F
111 , typename Tag = void_
113 struct BOOST_PP_CAT(quote,i_)
115 template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply
116 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
118 F< BOOST_MPL_PP_PARAMS(i_, U) >
119 , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value
122 : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value >
123 ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > >
130 #endif // BOOST_PP_IS_ITERATING