File indexing completed on 2025-01-30 09:48:05
0001
0002 #if !defined(BOOST_PP_IS_ITERATING)
0003
0004
0005
0006 #ifndef BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
0007 #define BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
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
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
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
0110 #endif
0111
0112
0113
0114
0115
0116 #else
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
0150 #endif