1
//-----------------------------------------------------------------------------
2
// boost mpl/quote.hpp header file
3
// See http://www.boost.org for updates, documentation, and revision history.
4
//-----------------------------------------------------------------------------
6
// Copyright (c) 2000-02
9
// Permission to use, copy, modify, distribute and sell this software
10
// and its documentation for any purpose is hereby granted without fee,
11
// provided that the above copyright notice appears in all copies and
12
// that both the copyright notice and this permission notice appear in
13
// supporting documentation. No representations are made about the
14
// suitability of this software for any purpose. It is provided "as is"
15
// without express or implied warranty.
17
#if !defined(BOOST_PP_IS_ITERATING)
21
#ifndef BOOST_MPL_QUOTE_HPP_INCLUDED
22
#define BOOST_MPL_QUOTE_HPP_INCLUDED
24
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
25
# include "boost/mpl/aux_/has_type.hpp"
28
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
30
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
31
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
33
# define BOOST_MPL_PREPROCESSED_HEADER quote.hpp
34
# include "boost/mpl/aux_/include_preprocessed.hpp"
38
# include "boost/mpl/limits/arity.hpp"
39
# include "boost/mpl/aux_/preprocessor/params.hpp"
40
# include "boost/mpl/aux_/config/ttp.hpp"
41
# include "boost/mpl/aux_/config/ctps.hpp"
43
# include "boost/preprocessor/iterate.hpp"
44
# include "boost/preprocessor/cat.hpp"
46
#if !defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS)
51
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
53
template< typename T, bool has_type_ = aux::has_type<T>::value >
55
#if !defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
60
typedef typename T::type type;
64
template< typename T >
65
struct quote_impl<T,false>
72
template< bool > struct quote_impl
74
template< typename T > struct result_
80
template<> struct quote_impl<false>
82
template< typename T > struct result_
88
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
90
#define BOOST_PP_ITERATION_PARAMS_1 \
91
(3,(1, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/quote.hpp"))
92
#include BOOST_PP_ITERATE()
97
#endif // BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS
99
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
100
#endif // BOOST_MPL_QUOTE_HPP_INCLUDED
105
#define i BOOST_PP_FRAME_ITERATION(1)
108
template< BOOST_MPL_PP_PARAMS(i, typename P) > class F
110
struct BOOST_PP_CAT(quote,i)
112
template< BOOST_MPL_PP_PARAMS(i, typename U) > struct apply
113
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
114
: quote_impl< F< BOOST_MPL_PP_PARAMS(i, U) > >
116
: quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i, U) > >::value >
117
::template result_< F< BOOST_MPL_PP_PARAMS(i, U) > >
124
#endif // BOOST_PP_IS_ITERATING