Files
boost_mpl/include/boost/mpl/bind.hpp
T

542 lines
14 KiB
C++
Raw Normal View History

2002-09-15 22:13:24 +00:00
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_BIND_HPP_INCLUDED
#define BOOST_MPL_BIND_HPP_INCLUDED
2004-09-02 15:41:37 +00:00
// Copyright Peter Dimov 2001
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Source$
// $Date$
// $Revision$
2002-09-15 22:13:24 +00:00
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
2004-09-02 15:41:37 +00:00
# include <boost/mpl/bind_fwd.hpp>
# include <boost/mpl/placeholders.hpp>
# include <boost/mpl/next.hpp>
# include <boost/mpl/protect.hpp>
# include <boost/mpl/apply_wrap.hpp>
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/na.hpp>
# include <boost/mpl/aux_/arity_spec.hpp>
# include <boost/mpl/aux_/type_wrapper.hpp>
# include <boost/mpl/aux_/yes_no.hpp>
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# include <boost/type_traits/is_reference.hpp>
2002-12-09 05:20:25 +00:00
# endif
2002-09-15 22:13:24 +00:00
#endif
2004-09-02 15:41:37 +00:00
#include <boost/mpl/aux_/config/bind.hpp>
2004-09-07 08:53:22 +00:00
#include <boost/mpl/aux_/config/static_constant.hpp>
2004-09-02 15:41:37 +00:00
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
# if defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT)
2002-09-15 22:13:24 +00:00
# define BOOST_MPL_PREPROCESSED_HEADER basic_bind.hpp
# else
# define BOOST_MPL_PREPROCESSED_HEADER bind.hpp
# endif
2004-09-02 15:41:37 +00:00
# include <boost/mpl/aux_/include_preprocessed.hpp>
2002-09-15 22:13:24 +00:00
#else
2004-09-02 15:41:37 +00:00
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
# include <boost/mpl/aux_/preprocessor/partial_spec_params.hpp>
# include <boost/mpl/aux_/preprocessor/ext_params.hpp>
# include <boost/mpl/aux_/preprocessor/repeat.hpp>
# include <boost/mpl/aux_/preprocessor/enum.hpp>
# include <boost/mpl/aux_/preprocessor/add.hpp>
# include <boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp>
# include <boost/mpl/aux_/config/ctps.hpp>
# include <boost/mpl/aux_/config/ttp.hpp>
# include <boost/mpl/aux_/config/dtp.hpp>
# include <boost/mpl/aux_/nttp_decl.hpp>
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/comma_if.hpp>
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/inc.hpp>
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
namespace boost { namespace mpl {
2003-06-23 12:44:12 +00:00
2002-09-15 22:13:24 +00:00
// local macros, #undef-ined at the end of the header
2004-09-02 15:41:37 +00:00
# define AUX778076_APPLY \
BOOST_PP_CAT(apply_wrap,BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \
2002-09-15 22:13:24 +00:00
/**/
2004-09-02 15:41:37 +00:00
# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS)
# define AUX778076_DMC_PARAM() , int dummy_
# else
# define AUX778076_DMC_PARAM()
# endif
# define AUX778076_BIND_PARAMS(param) \
2002-09-15 22:13:24 +00:00
BOOST_MPL_PP_PARAMS( \
2004-09-02 15:41:37 +00:00
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
2002-09-15 22:13:24 +00:00
, param \
) \
/**/
2004-09-02 15:41:37 +00:00
# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \
2002-09-15 22:13:24 +00:00
BOOST_MPL_PP_DEFAULT_PARAMS( \
2004-09-02 15:41:37 +00:00
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
2002-09-15 22:13:24 +00:00
, param \
, value \
) \
/**/
2004-09-02 15:41:37 +00:00
# define AUX778076_BIND_N_PARAMS(n, param) \
BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \
2002-09-15 22:13:24 +00:00
/**/
2004-09-02 15:41:37 +00:00
# define AUX778076_BIND_N_SPEC_PARAMS(n, param, def) \
2002-12-09 05:20:25 +00:00
BOOST_PP_COMMA_IF(n) \
BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \
2002-09-15 22:13:24 +00:00
/**/
2004-09-02 15:41:37 +00:00
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \
AUX778076_BIND_DEFAULT_PARAMS(param, value) \
2002-10-07 11:32:25 +00:00
/**/
#else
2004-09-02 15:41:37 +00:00
# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \
AUX778076_BIND_PARAMS(param) \
2002-10-07 11:32:25 +00:00
/**/
#endif
2002-09-15 22:13:24 +00:00
namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
2004-09-02 15:41:37 +00:00
typename T, AUX778076_BIND_PARAMS(typename U)
2002-09-15 22:13:24 +00:00
>
struct resolve_bind_arg
{
typedef T type;
};
2004-09-02 15:41:37 +00:00
# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT)
2002-09-15 22:13:24 +00:00
template<
typename T
, typename Arg
>
struct replace_unnamed_arg
{
2004-09-02 15:41:37 +00:00
typedef Arg next;
2002-09-15 22:13:24 +00:00
typedef T type;
};
template<
typename Arg
>
struct replace_unnamed_arg< arg<-1>,Arg >
{
2004-09-02 15:41:37 +00:00
typedef typename Arg::next next;
2002-09-15 22:13:24 +00:00
typedef Arg type;
};
2004-09-02 15:41:37 +00:00
# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
template<
BOOST_MPL_AUX_NTTP_DECL(int, N), AUX778076_BIND_PARAMS(typename U)
>
struct resolve_bind_arg< arg<N>,AUX778076_BIND_PARAMS(U) >
{
typedef typename AUX778076_APPLY<mpl::arg<N>, AUX778076_BIND_PARAMS(U)>::type type;
};
#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE)
template<
typename F, AUX778076_BIND_PARAMS(typename T), AUX778076_BIND_PARAMS(typename U)
>
struct resolve_bind_arg< bind<F,AUX778076_BIND_PARAMS(T)>,AUX778076_BIND_PARAMS(U) >
{
typedef bind<F,AUX778076_BIND_PARAMS(T)> f_;
typedef typename AUX778076_APPLY<f_, AUX778076_BIND_PARAMS(U)>::type type;
};
#endif
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
2002-09-15 22:13:24 +00:00
// agurt, 15/jan/02: it's not a intended to be used as a function class, and
// MSVC6.5 has problems with 'apply' name here (the code compiles, but doesn't
2004-09-02 15:41:37 +00:00
// work), so I went with the 'result_' here, and in all other similar cases
2002-09-15 22:13:24 +00:00
template< bool >
struct resolve_arg_impl
{
2004-09-02 15:41:37 +00:00
template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_
2002-09-15 22:13:24 +00:00
{
typedef T type;
};
};
template<>
struct resolve_arg_impl<true>
{
2004-09-02 15:41:37 +00:00
template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_
2002-09-15 22:13:24 +00:00
{
2004-09-02 15:41:37 +00:00
typedef typename AUX778076_APPLY<
2002-09-15 22:13:24 +00:00
T
2004-09-02 15:41:37 +00:00
, AUX778076_BIND_PARAMS(U)
>::type type;
2002-09-15 22:13:24 +00:00
};
};
// for 'resolve_bind_arg'
template< typename T > struct is_bind_template;
template<
2004-09-02 15:41:37 +00:00
typename T, AUX778076_BIND_PARAMS(typename U)
2002-09-15 22:13:24 +00:00
>
struct resolve_bind_arg
: resolve_arg_impl< is_bind_template<T>::value >
2004-09-02 15:41:37 +00:00
::template result_< T,AUX778076_BIND_PARAMS(U) >
2002-09-15 22:13:24 +00:00
{
};
2004-09-02 15:41:37 +00:00
# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT)
2002-09-15 22:13:24 +00:00
template< typename T >
struct replace_unnamed_arg_impl
{
template< typename Arg > struct result_
{
2004-09-02 15:41:37 +00:00
typedef Arg next;
2002-09-15 22:13:24 +00:00
typedef T type;
};
};
template<>
struct replace_unnamed_arg_impl< arg<-1> >
{
template< typename Arg > struct result_
{
2004-09-02 15:41:37 +00:00
typedef typename next<Arg>::type next;
2002-09-15 22:13:24 +00:00
typedef Arg type;
};
};
template< typename T, typename Arg >
struct replace_unnamed_arg
: replace_unnamed_arg_impl<T>::template result_<Arg>
{
};
2004-09-02 15:41:37 +00:00
# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT
2002-09-15 22:13:24 +00:00
// agurt, 10/mar/02: the forward declaration has to appear before any of
// 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it
2004-09-02 15:41:37 +00:00
template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_chooser;
2002-09-15 22:13:24 +00:00
aux::no_tag is_bind_helper(...);
template< typename T > aux::no_tag is_bind_helper(protect<T>*);
// overload for "main" form
// agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload
// in case if we use 'aux::type_wrapper< bind<...> >' here, and all
// 'bind' instantiations form a complete type anyway
2004-09-02 15:41:37 +00:00
#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE)
2002-09-15 22:13:24 +00:00
template<
2004-09-02 15:41:37 +00:00
typename F, AUX778076_BIND_PARAMS(typename T)
2002-09-15 22:13:24 +00:00
>
2004-09-02 15:41:37 +00:00
aux::yes_tag is_bind_helper(bind<F,AUX778076_BIND_PARAMS(T)>*);
2002-10-07 11:32:25 +00:00
#endif
2002-09-15 22:13:24 +00:00
2002-12-09 05:20:25 +00:00
template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
2002-09-15 22:13:24 +00:00
aux::yes_tag is_bind_helper(arg<N>*);
2002-12-09 05:20:25 +00:00
template< bool is_ref_ = true >
struct is_bind_template_impl
{
2002-12-09 05:20:25 +00:00
template< typename T > struct result_
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
};
2002-12-09 05:20:25 +00:00
template<>
struct is_bind_template_impl<false>
{
2002-12-09 05:20:25 +00:00
template< typename T > struct result_
{
2002-12-09 05:20:25 +00:00
BOOST_STATIC_CONSTANT(bool, value =
sizeof(aux::is_bind_helper(static_cast<T*>(0)))
== sizeof(aux::yes_tag)
);
};
};
2002-09-15 22:13:24 +00:00
template< typename T > struct is_bind_template
2002-12-09 05:20:25 +00:00
: is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
::template result_<T>
2002-09-15 22:13:24 +00:00
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace aux
2002-10-07 11:32:25 +00:00
2002-09-15 22:13:24 +00:00
#define BOOST_PP_ITERATION_PARAMS_1 \
2004-09-02 15:41:37 +00:00
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/bind.hpp>))
2002-09-15 22:13:24 +00:00
#include BOOST_PP_ITERATE()
2004-09-02 15:41:37 +00:00
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
&& !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS)
/// if_/eval_if specializations
# define AUX778076_SPEC_NAME if_
# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, <boost/mpl/bind.hpp>))
# include BOOST_PP_ITERATE()
#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS)
# define AUX778076_SPEC_NAME eval_if
# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, <boost/mpl/bind.hpp>))
# include BOOST_PP_ITERATE()
#endif
#endif
2002-09-15 22:13:24 +00:00
// real C++ version is already taken care of
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
2004-09-02 15:41:37 +00:00
&& !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE)
2002-09-15 22:13:24 +00:00
namespace aux {
// apply_count_args
2004-09-02 15:41:37 +00:00
#define AUX778076_COUNT_ARGS_PREFIX bind
#define AUX778076_COUNT_ARGS_DEFAULT na
#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
#include <boost/mpl/aux_/count_args.hpp>
2002-09-15 22:13:24 +00:00
}
// bind
template<
2004-09-02 15:41:37 +00:00
typename F, AUX778076_BIND_PARAMS(typename T) AUX778076_DMC_PARAM()
2002-09-15 22:13:24 +00:00
>
struct bind
2004-09-02 15:41:37 +00:00
: aux::bind_chooser<
aux::bind_count_args<AUX778076_BIND_PARAMS(T)>::value
>::template result_< F,AUX778076_BIND_PARAMS(T) >::type
2002-09-15 22:13:24 +00:00
{
};
2004-09-02 15:41:37 +00:00
BOOST_MPL_AUX_ARITY_SPEC(
BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY)
, bind
)
2002-09-15 22:13:24 +00:00
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
2004-09-02 15:41:37 +00:00
# undef AUX778076_BIND_NESTED_DEFAULT_PARAMS
# undef AUX778076_BIND_N_SPEC_PARAMS
# undef AUX778076_BIND_N_PARAMS
# undef AUX778076_BIND_DEFAULT_PARAMS
# undef AUX778076_BIND_PARAMS
# undef AUX778076_DMC_PARAM
# undef AUX778076_APPLY
2003-06-23 12:44:12 +00:00
2004-09-02 15:41:37 +00:00
}}
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
2002-09-15 22:13:24 +00:00
#endif // BOOST_MPL_BIND_HPP_INCLUDED
///// iteration, depth == 1
#elif BOOST_PP_ITERATION_DEPTH() == 1
2004-09-02 15:41:37 +00:00
# define i_ BOOST_PP_FRAME_ITERATION(1)
#if defined(AUX778076_SPEC_NAME)
// lazy metafunction specialization
template< template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F, typename Tag >
struct BOOST_PP_CAT(quote,i_);
template< BOOST_MPL_PP_PARAMS(i_, typename T) > struct AUX778076_SPEC_NAME;
2002-09-15 22:13:24 +00:00
template<
2004-09-02 15:41:37 +00:00
typename Tag AUX778076_BIND_N_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(bind,i_)<
BOOST_PP_CAT(quote,i_)<AUX778076_SPEC_NAME,Tag>
AUX778076_BIND_N_PARAMS(i_,T)
2002-09-15 22:13:24 +00:00
>
{
template<
2004-09-02 15:41:37 +00:00
AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na)
2002-09-15 22:13:24 +00:00
>
struct apply
{
private:
2004-09-02 15:41:37 +00:00
typedef mpl::arg<1> n1;
# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, <boost/mpl/bind.hpp>))
# include BOOST_PP_ITERATE()
typedef typename AUX778076_SPEC_NAME<
typename t1::type
, BOOST_MPL_PP_EXT_PARAMS(2, BOOST_PP_INC(i_), t)
>::type f_;
public:
typedef typename f_::type type;
};
};
#undef AUX778076_SPEC_NAME
#else // AUX778076_SPEC_NAME
template<
typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM()
>
struct BOOST_PP_CAT(bind,i_)
{
template<
AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na)
>
struct apply
{
private:
# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT)
2002-09-15 22:13:24 +00:00
2002-10-07 13:31:24 +00:00
typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0;
2002-09-15 22:13:24 +00:00
typedef typename r0::type a0;
2004-09-02 15:41:37 +00:00
typedef typename r0::next n1;
typedef typename aux::resolve_bind_arg<a0,AUX778076_BIND_PARAMS(U)>::type f_;
///
2002-09-15 22:13:24 +00:00
# else
2004-09-02 15:41:37 +00:00
typedef typename aux::resolve_bind_arg<F,AUX778076_BIND_PARAMS(U)>::type f_;
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
# if i_ > 0
# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, <boost/mpl/bind.hpp>))
2002-09-15 22:13:24 +00:00
# include BOOST_PP_ITERATE()
2002-10-07 11:32:25 +00:00
# endif
2002-09-15 22:13:24 +00:00
public:
2004-09-02 15:41:37 +00:00
# define AUX778076_ARG(unused, i_, t) \
BOOST_PP_COMMA_IF(i_) \
typename BOOST_PP_CAT(t,BOOST_PP_INC(i_))::type \
/**/
typedef typename BOOST_PP_CAT(apply_wrap,i_)<
f_
BOOST_PP_COMMA_IF(i_) BOOST_MPL_PP_REPEAT(i_, AUX778076_ARG, t)
>::type type;
# undef AUX778076_ARG
2002-09-15 22:13:24 +00:00
};
};
namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
2004-09-02 15:41:37 +00:00
typename F AUX778076_BIND_N_PARAMS(i_, typename T), AUX778076_BIND_PARAMS(typename U)
2002-09-15 22:13:24 +00:00
>
struct resolve_bind_arg<
2004-09-02 15:41:37 +00:00
BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T)>,AUX778076_BIND_PARAMS(U)
2002-09-15 22:13:24 +00:00
>
{
2004-09-02 15:41:37 +00:00
typedef BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T)> f_;
typedef typename AUX778076_APPLY<f_, AUX778076_BIND_PARAMS(U)>::type type;
2002-09-15 22:13:24 +00:00
};
#else
template<
2004-09-02 15:41:37 +00:00
typename F AUX778076_BIND_N_PARAMS(i_, typename T)
2002-09-15 22:13:24 +00:00
>
aux::yes_tag
2004-09-02 15:41:37 +00:00
is_bind_helper(BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T)>*);
2002-09-15 22:13:24 +00:00
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace aux
2004-09-02 15:41:37 +00:00
BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_))
2002-09-15 22:13:24 +00:00
2002-10-07 11:32:25 +00:00
2004-09-02 15:41:37 +00:00
# if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE)
2002-09-15 22:13:24 +00:00
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
2002-10-07 11:32:25 +00:00
2004-09-02 15:41:37 +00:00
#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY
/// primary template (not a specialization!)
2002-09-15 22:13:24 +00:00
template<
2004-09-02 15:41:37 +00:00
typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM()
2002-09-15 22:13:24 +00:00
>
struct bind
2004-09-02 15:41:37 +00:00
: BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T) >
2002-09-15 22:13:24 +00:00
{
};
#else
template<
2004-09-02 15:41:37 +00:00
typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM()
2002-09-15 22:13:24 +00:00
>
2004-09-02 15:41:37 +00:00
struct bind< F AUX778076_BIND_N_SPEC_PARAMS(i_, T, na) >
: BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T) >
2002-09-15 22:13:24 +00:00
{
};
2004-09-02 15:41:37 +00:00
#endif
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
2002-09-15 22:13:24 +00:00
namespace aux {
template<>
2004-09-02 15:41:37 +00:00
struct bind_chooser<i_>
2002-09-15 22:13:24 +00:00
{
template<
2004-09-02 15:41:37 +00:00
typename F, AUX778076_BIND_PARAMS(typename T)
2002-09-15 22:13:24 +00:00
>
struct result_
{
2004-09-02 15:41:37 +00:00
typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_,T) > type;
2002-09-15 22:13:24 +00:00
};
};
} // namespace aux
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
2004-09-02 15:41:37 +00:00
# endif // BOOST_MPL_CFG_NO_BIND_TEMPLATE
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
#endif // AUX778076_SPEC_NAME
# undef i_
2002-09-15 22:13:24 +00:00
///// iteration, depth == 2
#elif BOOST_PP_ITERATION_DEPTH() == 2
2004-09-02 15:41:37 +00:00
# define j_ BOOST_PP_FRAME_ITERATION(2)
# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT)
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
typedef aux::replace_unnamed_arg< BOOST_PP_CAT(T,j_),BOOST_PP_CAT(n,j_) > BOOST_PP_CAT(r,j_);
typedef typename BOOST_PP_CAT(r,j_)::type BOOST_PP_CAT(a,j_);
typedef typename BOOST_PP_CAT(r,j_)::next BOOST_PP_CAT(n,BOOST_PP_INC(j_));
typedef aux::resolve_bind_arg<BOOST_PP_CAT(a,j_), AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_);
///
2002-09-15 22:13:24 +00:00
# else
2004-09-02 15:41:37 +00:00
typedef aux::resolve_bind_arg< BOOST_PP_CAT(T,j_),AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_);
2002-09-15 22:13:24 +00:00
# endif
2004-09-02 15:41:37 +00:00
# undef j_
2002-09-15 22:13:24 +00:00
#endif // BOOST_PP_IS_ITERATING