1 // Copyright David Abrahams, Daniel Wallin 2003. Use, modification and
2 // distribution is subject to the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 // This file generates overloads in this format:
8 // template<class A0, class A1>
9 // typename mpl::apply_wrap1<
10 // aux::make_arg_list<
12 // , aux::make_arg_list<
14 // , mpl::identity<aux::empty_arg_list>
19 // operator()(A0 const& a0, A1 const& a1) const
21 // typedef typename mpl::apply_wrap1<
22 // aux::make_arg_list<
24 // , aux::make_arg_list<
26 // , mpl::identity<aux::empty_arg_list>
40 #if !defined(BOOST_PP_IS_ITERATING)
41 # error Boost.Parameters - do not include this file!
44 #define N BOOST_PP_ITERATION()
46 #define BOOST_PARAMETER_open_list(z, n, text) \
48 BOOST_PP_CAT(PS, n), BOOST_PP_CAT(A, n)
50 #define BOOST_PARAMETER_close_list(z, n, text) >
52 #define BOOST_PARAMETER_arg_list(n) \
54 BOOST_PP_ENUM(N, BOOST_PARAMETER_open_list, _) \
56 BOOST_PP_REPEAT(N, BOOST_PARAMETER_close_list, _) \
58 , aux::tag_keyword_arg \
61 #define BOOST_PARAMETER_arg_pack_init(z, n, limit) \
62 BOOST_PP_CAT(a, BOOST_PP_SUB(limit,n))
64 template<BOOST_PP_ENUM_PARAMS(N, class A)>
66 typename BOOST_PARAMETER_arg_list(N)::type
68 operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, & a)) const
70 typedef typename BOOST_PARAMETER_arg_list(N)::type result;
72 typedef typename mpl::first<result>::type result_type;
73 typedef typename mpl::second<result>::type error;
77 BOOST_PP_ENUM(N, BOOST_PARAMETER_arg_pack_init, BOOST_PP_DEC(N))
78 BOOST_PP_ENUM_TRAILING_PARAMS(
79 BOOST_PP_SUB(BOOST_PARAMETER_MAX_ARITY, N)
80 , aux::void_reference() BOOST_PP_INTERCEPT
84 #undef BOOST_PARAMETER_arg_list
85 #undef BOOST_PARAMETER_open_list
86 #undef BOOST_PARAMETER_close_list