Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:48:05

0001 
0002 #if !defined(BOOST_PP_IS_ITERATING)
0003 
0004 ///// header body
0005 
0006 #ifndef BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
0007 #define BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
0008 
0009 // Copyright Aleksey Gurtovoy 2002-2004
0010 //
0011 // Distributed under the Boost Software License, Version 1.0. 
0012 // (See accompanying file LICENSE_1_0.txt or copy at 
0013 // http://www.boost.org/LICENSE_1_0.txt)
0014 //
0015 // See http://www.boost.org/libs/mpl for documentation.
0016 
0017 // $Id$
0018 // $Date$
0019 // $Revision$
0020 
0021 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
0022 #   include <boost/mpl/apply.hpp>
0023 #   include <boost/mpl/at.hpp>
0024 #   include <boost/mpl/size.hpp>
0025 #   include <boost/mpl/aux_/nttp_decl.hpp>
0026 #   include <boost/mpl/aux_/lambda_spec.hpp>
0027 #endif
0028 
0029 #include <boost/mpl/aux_/config/use_preprocessed.hpp>
0030 
0031 #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
0032     && !defined(BOOST_MPL_PREPROCESSING_MODE)
0033 
0034 #   define BOOST_MPL_PREPROCESSED_HEADER unpack_args.hpp
0035 #   include <boost/mpl/aux_/include_preprocessed.hpp>
0036 
0037 #else
0038 
0039 #   include <boost/mpl/limits/arity.hpp>
0040 #   include <boost/mpl/aux_/preprocessor/repeat.hpp>
0041 #   include <boost/mpl/aux_/config/ctps.hpp>
0042 #   include <boost/mpl/aux_/config/forwarding.hpp>
0043 #   include <boost/preprocessor/iterate.hpp>
0044 #   include <boost/preprocessor/cat.hpp>
0045 
0046 
0047 namespace boost { namespace mpl {
0048 
0049 // local macros, #undef-ined at the end of the header
0050 
0051 #   define AUX778076_UNPACK(unused, i, Args) \
0052     , typename at_c<Args,i>::type \
0053     /**/
0054 
0055 #   define AUX778076_UNPACKED_ARGS(n, Args) \
0056     BOOST_MPL_PP_REPEAT(n, AUX778076_UNPACK, Args) \
0057     /**/
0058 
0059 namespace aux {
0060 
0061 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0062 template< int size, typename F, typename Args >
0063 struct unpack_args_impl;
0064 #else
0065 template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl
0066 {
0067     template< typename F, typename Args > struct apply;
0068 };
0069 #endif
0070 
0071 #define BOOST_PP_ITERATION_PARAMS_1 \
0072     (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/unpack_args.hpp>))
0073 #include BOOST_PP_ITERATE()
0074 
0075 }
0076 
0077 template<
0078       typename F
0079     >
0080 struct unpack_args
0081 {
0082     template< typename Args > struct apply
0083 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
0084 #   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0085         : aux::unpack_args_impl< size<Args>::value,F,Args >
0086 #   else
0087         : aux::unpack_args_impl< size<Args>::value >
0088             ::template apply< F,Args >
0089 #   endif
0090     {
0091 #else // BOOST_MPL_CFG_NO_NESTED_FORWARDING
0092     {
0093         typedef typename aux::unpack_args_impl< 
0094               size<Args>::value
0095             , F
0096             , Args
0097             >::type type;
0098 #endif
0099     };
0100 };
0101 
0102 BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
0103 
0104 #   undef AUX778076_UNPACK
0105 #   undef AUX778076_UNPACKED_ARGS
0106 
0107 }}
0108 
0109 #endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS
0110 #endif // BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
0111 
0112 ///// iteration, depth == 1
0113 
0114 // For gcc 4.4 compatability, we must include the
0115 // BOOST_PP_ITERATION_DEPTH test inside an #else clause.
0116 #else // BOOST_PP_IS_ITERATING
0117 #if BOOST_PP_ITERATION_DEPTH() == 1
0118 
0119 #   define i_ BOOST_PP_FRAME_ITERATION(1)
0120 
0121 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0122 
0123 template< typename F, typename Args >
0124 struct unpack_args_impl<i_,F,Args>
0125     : BOOST_PP_CAT(apply,i_)<
0126           F
0127         AUX778076_UNPACKED_ARGS(i_, Args)
0128         >
0129 {
0130 };
0131 
0132 #else
0133 
0134 template<> struct unpack_args_impl<i_>
0135 {
0136     template< typename F, typename Args > struct apply
0137         : BOOST_PP_CAT(apply,i_)<
0138               F
0139             AUX778076_UNPACKED_ARGS(i_, Args)
0140             >
0141     {
0142     };
0143 };
0144 
0145 #endif
0146 
0147 #   undef i_
0148 
0149 #endif // BOOST_PP_ITERATION_DEPTH()
0150 #endif // BOOST_PP_IS_ITERATING