sl@0: sl@0: #if !defined(BOOST_PP_IS_ITERATING) sl@0: sl@0: ///// header body sl@0: sl@0: #ifndef BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED sl@0: #define BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED sl@0: sl@0: // Copyright Aleksey Gurtovoy 2002-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/unpack_args.hpp,v $ sl@0: // $Date: 2004/09/02 15:40:42 $ sl@0: // $Revision: 1.2 $ sl@0: sl@0: #if !defined(BOOST_MPL_PREPROCESSING_MODE) sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: # include 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 unpack_args.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: # include sl@0: # include sl@0: sl@0: sl@0: namespace boost { namespace mpl { sl@0: sl@0: // local macros, #undef-ined at the end of the header sl@0: sl@0: # define AUX778076_UNPACK(unused, i, Args) \ sl@0: , typename at_c::type \ sl@0: /**/ sl@0: sl@0: # define AUX778076_UNPACKED_ARGS(n, Args) \ sl@0: BOOST_MPL_PP_REPEAT(n, AUX778076_UNPACK, Args) \ sl@0: /**/ sl@0: sl@0: namespace aux { sl@0: sl@0: #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) sl@0: template< int size, typename F, typename Args > sl@0: struct unpack_args_impl; sl@0: #else sl@0: template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl sl@0: { sl@0: template< typename F, typename Args > struct apply; sl@0: }; sl@0: #endif sl@0: sl@0: #define BOOST_PP_ITERATION_PARAMS_1 \ sl@0: (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) sl@0: #include BOOST_PP_ITERATE() sl@0: sl@0: } sl@0: sl@0: template< sl@0: typename F sl@0: > sl@0: struct unpack_args sl@0: { sl@0: template< typename Args > struct apply sl@0: #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) sl@0: # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) sl@0: : aux::unpack_args_impl< size::value,F,Args > sl@0: # else sl@0: : aux::unpack_args_impl< size::value > sl@0: ::template apply< F,Args > sl@0: # endif sl@0: { sl@0: #else // BOOST_MPL_CFG_NO_NESTED_FORWARDING sl@0: { sl@0: typedef typename aux::unpack_args_impl< sl@0: size::value sl@0: , F sl@0: , Args sl@0: >::type type; sl@0: #endif sl@0: }; sl@0: }; sl@0: sl@0: BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) sl@0: sl@0: # undef AUX778076_UNPACK sl@0: # undef AUX778076_UNPACKED_ARGS sl@0: sl@0: }} sl@0: sl@0: #endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS sl@0: #endif // BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED sl@0: sl@0: ///// iteration, depth == 1 sl@0: sl@0: #elif BOOST_PP_ITERATION_DEPTH() == 1 sl@0: sl@0: # define i_ BOOST_PP_FRAME_ITERATION(1) sl@0: sl@0: #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) sl@0: sl@0: template< typename F, typename Args > sl@0: struct unpack_args_impl sl@0: : BOOST_PP_CAT(apply,i_)< sl@0: F sl@0: AUX778076_UNPACKED_ARGS(i_, Args) sl@0: > sl@0: { sl@0: }; sl@0: sl@0: #else sl@0: sl@0: template<> struct unpack_args_impl sl@0: { sl@0: template< typename F, typename Args > struct apply sl@0: : BOOST_PP_CAT(apply,i_)< sl@0: F sl@0: AUX778076_UNPACKED_ARGS(i_, Args) sl@0: > sl@0: { sl@0: }; sl@0: }; sl@0: sl@0: #endif sl@0: sl@0: # undef i_ sl@0: sl@0: #endif // BOOST_PP_IS_ITERATING