os/ossrv/ossrv_pub/boost_apis/boost/mpl/unpack_args.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/mpl/unpack_args.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,146 @@
     1.4 +
     1.5 +#if !defined(BOOST_PP_IS_ITERATING)
     1.6 +
     1.7 +///// header body
     1.8 +
     1.9 +#ifndef BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
    1.10 +#define BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
    1.11 +
    1.12 +// Copyright Aleksey Gurtovoy 2002-2004
    1.13 +//
    1.14 +// Distributed under the Boost Software License, Version 1.0. 
    1.15 +// (See accompanying file LICENSE_1_0.txt or copy at 
    1.16 +// http://www.boost.org/LICENSE_1_0.txt)
    1.17 +//
    1.18 +// See http://www.boost.org/libs/mpl for documentation.
    1.19 +
    1.20 +// $Source: /cvsroot/boost/boost/boost/mpl/unpack_args.hpp,v $
    1.21 +// $Date: 2004/09/02 15:40:42 $
    1.22 +// $Revision: 1.2 $
    1.23 +
    1.24 +#if !defined(BOOST_MPL_PREPROCESSING_MODE)
    1.25 +#   include <boost/mpl/apply.hpp>
    1.26 +#   include <boost/mpl/at.hpp>
    1.27 +#   include <boost/mpl/size.hpp>
    1.28 +#   include <boost/mpl/aux_/nttp_decl.hpp>
    1.29 +#   include <boost/mpl/aux_/lambda_spec.hpp>
    1.30 +#endif
    1.31 +
    1.32 +#include <boost/mpl/aux_/config/use_preprocessed.hpp>
    1.33 +
    1.34 +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
    1.35 +    && !defined(BOOST_MPL_PREPROCESSING_MODE)
    1.36 +
    1.37 +#   define BOOST_MPL_PREPROCESSED_HEADER unpack_args.hpp
    1.38 +#   include <boost/mpl/aux_/include_preprocessed.hpp>
    1.39 +
    1.40 +#else
    1.41 +
    1.42 +#   include <boost/mpl/limits/arity.hpp>
    1.43 +#   include <boost/mpl/aux_/preprocessor/repeat.hpp>
    1.44 +#   include <boost/mpl/aux_/config/ctps.hpp>
    1.45 +#   include <boost/mpl/aux_/config/forwarding.hpp>
    1.46 +#   include <boost/preprocessor/iterate.hpp>
    1.47 +#   include <boost/preprocessor/cat.hpp>
    1.48 +
    1.49 +
    1.50 +namespace boost { namespace mpl {
    1.51 +
    1.52 +// local macros, #undef-ined at the end of the header
    1.53 +
    1.54 +#   define AUX778076_UNPACK(unused, i, Args) \
    1.55 +    , typename at_c<Args,i>::type \
    1.56 +    /**/
    1.57 +
    1.58 +#   define AUX778076_UNPACKED_ARGS(n, Args) \
    1.59 +    BOOST_MPL_PP_REPEAT(n, AUX778076_UNPACK, Args) \
    1.60 +    /**/
    1.61 +
    1.62 +namespace aux {
    1.63 +
    1.64 +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
    1.65 +template< int size, typename F, typename Args >
    1.66 +struct unpack_args_impl;
    1.67 +#else
    1.68 +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl
    1.69 +{
    1.70 +    template< typename F, typename Args > struct apply;
    1.71 +};
    1.72 +#endif
    1.73 +
    1.74 +#define BOOST_PP_ITERATION_PARAMS_1 \
    1.75 +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/unpack_args.hpp>))
    1.76 +#include BOOST_PP_ITERATE()
    1.77 +
    1.78 +}
    1.79 +
    1.80 +template<
    1.81 +      typename F
    1.82 +    >
    1.83 +struct unpack_args
    1.84 +{
    1.85 +    template< typename Args > struct apply
    1.86 +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
    1.87 +#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
    1.88 +        : aux::unpack_args_impl< size<Args>::value,F,Args >
    1.89 +#   else
    1.90 +        : aux::unpack_args_impl< size<Args>::value >
    1.91 +            ::template apply< F,Args >
    1.92 +#   endif
    1.93 +    {
    1.94 +#else // BOOST_MPL_CFG_NO_NESTED_FORWARDING
    1.95 +    {
    1.96 +        typedef typename aux::unpack_args_impl< 
    1.97 +              size<Args>::value
    1.98 +            , F
    1.99 +            , Args
   1.100 +            >::type type;
   1.101 +#endif
   1.102 +    };
   1.103 +};
   1.104 +
   1.105 +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
   1.106 +
   1.107 +#   undef AUX778076_UNPACK
   1.108 +#   undef AUX778076_UNPACKED_ARGS
   1.109 +
   1.110 +}}
   1.111 +
   1.112 +#endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS
   1.113 +#endif // BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
   1.114 +
   1.115 +///// iteration, depth == 1
   1.116 +
   1.117 +#elif BOOST_PP_ITERATION_DEPTH() == 1
   1.118 +
   1.119 +#   define i_ BOOST_PP_FRAME_ITERATION(1)
   1.120 +
   1.121 +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
   1.122 +
   1.123 +template< typename F, typename Args >
   1.124 +struct unpack_args_impl<i_,F,Args>
   1.125 +    : BOOST_PP_CAT(apply,i_)<
   1.126 +          F
   1.127 +        AUX778076_UNPACKED_ARGS(i_, Args)
   1.128 +        >
   1.129 +{
   1.130 +};
   1.131 +
   1.132 +#else
   1.133 +
   1.134 +template<> struct unpack_args_impl<i_>
   1.135 +{
   1.136 +    template< typename F, typename Args > struct apply
   1.137 +        : BOOST_PP_CAT(apply,i_)<
   1.138 +              F
   1.139 +            AUX778076_UNPACKED_ARGS(i_, Args)
   1.140 +            >
   1.141 +    {
   1.142 +    };
   1.143 +};
   1.144 +
   1.145 +#endif
   1.146 +
   1.147 +#   undef i_
   1.148 +
   1.149 +#endif // BOOST_PP_IS_ITERATING