sl@0: sl@0: #if !defined(BOOST_PP_IS_ITERATING) sl@0: sl@0: ///// header body sl@0: sl@0: #ifndef BOOST_MPL_QUOTE_HPP_INCLUDED sl@0: #define BOOST_MPL_QUOTE_HPP_INCLUDED sl@0: sl@0: // Copyright Aleksey Gurtovoy 2000-2004 sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. sl@0: // (See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: // sl@0: // See http://www.boost.org/libs/mpl for documentation. sl@0: sl@0: // $Source: /cvsroot/boost/boost/boost/mpl/quote.hpp,v $ sl@0: // $Date: 2006/05/03 03:27:58 $ sl@0: // $Revision: 1.5.14.2 $ sl@0: sl@0: #if !defined(BOOST_MPL_PREPROCESSING_MODE) sl@0: # include sl@0: # include sl@0: #endif sl@0: sl@0: #include sl@0: sl@0: #if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) sl@0: # define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE sl@0: #endif sl@0: sl@0: #if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \ sl@0: && defined(BOOST_MPL_CFG_NO_HAS_XXX) sl@0: # define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS sl@0: #endif sl@0: sl@0: #include sl@0: sl@0: #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ sl@0: && !defined(BOOST_MPL_PREPROCESSING_MODE) sl@0: sl@0: # define BOOST_MPL_PREPROCESSED_HEADER quote.hpp sl@0: # include sl@0: sl@0: #else sl@0: sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: sl@0: # include sl@0: # include sl@0: sl@0: #if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE) sl@0: sl@0: namespace boost { namespace mpl { sl@0: sl@0: #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) sl@0: sl@0: template< typename T, bool has_type_ > sl@0: struct quote_impl sl@0: // GCC has a problem with metafunction forwarding when T is a sl@0: // specialization of a template called 'type'. sl@0: # if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \ sl@0: && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \ sl@0: && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(2)) sl@0: { sl@0: typedef typename T::type type; sl@0: }; sl@0: # else sl@0: : T sl@0: { sl@0: }; sl@0: # endif sl@0: sl@0: template< typename T > sl@0: struct quote_impl sl@0: { sl@0: typedef T type; sl@0: }; sl@0: sl@0: #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION sl@0: sl@0: template< bool > struct quote_impl sl@0: { sl@0: template< typename T > struct result_ sl@0: : T sl@0: { sl@0: }; sl@0: }; sl@0: sl@0: template<> struct quote_impl sl@0: { sl@0: template< typename T > struct result_ sl@0: { sl@0: typedef T type; sl@0: }; sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: #define BOOST_PP_ITERATION_PARAMS_1 \ sl@0: (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) sl@0: #include BOOST_PP_ITERATE() sl@0: sl@0: }} sl@0: sl@0: #endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE sl@0: sl@0: #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS sl@0: #endif // BOOST_MPL_QUOTE_HPP_INCLUDED sl@0: sl@0: ///// iteration sl@0: sl@0: #else sl@0: #define i_ BOOST_PP_FRAME_ITERATION(1) sl@0: sl@0: template< sl@0: template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F sl@0: , typename Tag = void_ sl@0: > sl@0: struct BOOST_PP_CAT(quote,i_) sl@0: { sl@0: template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply sl@0: #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) sl@0: : quote_impl< sl@0: F< BOOST_MPL_PP_PARAMS(i_, U) > sl@0: , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value sl@0: > sl@0: #else sl@0: : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > sl@0: ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > > sl@0: #endif sl@0: { sl@0: }; sl@0: }; sl@0: sl@0: #undef i_ sl@0: #endif // BOOST_PP_IS_ITERATING