1 // Copyright David Abrahams, Daniel Wallin 2003.
2 // Distributed under 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 <typename A0, typename A1>
9 // typename ::boost::mpl::apply_wrap1<
10 // ::boost::parameter::aux::make_arg_list<
12 // , ::boost::parameter::aux::make_arg_list<
14 // , ::boost::mpl::identity<
15 // ::boost::parameter::aux::empty_arg_list
21 // operator()(A0 const& a0, A1 const& a1) const
23 // typedef typename ::boost::mpl::apply_wrap1<
24 // ::boost::parameter::aux::make_arg_list<
26 // , ::boost::parameter::aux::make_arg_list<
28 // , ::boost::mpl::identity<
29 // ::boost::parameter::aux::empty_arg_list
38 // , ::boost::parameter::aux::void_()
44 #if !defined(BOOST_PP_IS_ITERATING)
45 # error Boost.Parameters - do not include this file!
48 #define N BOOST_PP_ITERATION()
50 #define BOOST_PARAMETER_open_list(z, n, text) \
51 ::boost::parameter::aux::item< \
52 BOOST_PP_CAT(PS, n), BOOST_PP_CAT(A, n)
54 #define BOOST_PARAMETER_close_list(z, n, text) >
56 #define BOOST_PARAMETER_arg_list(n) \
57 ::boost::parameter::aux::make_arg_list< \
58 BOOST_PP_ENUM(N, BOOST_PARAMETER_open_list, _) \
59 , ::boost::parameter::void_ \
60 BOOST_PP_REPEAT(N, BOOST_PARAMETER_close_list, _) \
62 , ::boost::parameter::aux::tag_keyword_arg \
65 #define BOOST_PARAMETER_arg_pack_init(z, n, limit) \
66 BOOST_PP_CAT(a, BOOST_PP_SUB(limit, n))
68 template <BOOST_PP_ENUM_PARAMS(N, typename A)>
69 typename ::boost::mpl::first<
70 typename BOOST_PARAMETER_arg_list(N)::type
72 operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, & a)) const
74 typedef typename BOOST_PARAMETER_arg_list(N)::type result;
75 typedef typename ::boost::mpl::first<result>::type result_type;
76 typedef typename ::boost::mpl::second<result>::type error;
80 BOOST_PP_ENUM(N, BOOST_PARAMETER_arg_pack_init, BOOST_PP_DEC(N))
81 BOOST_PP_ENUM_TRAILING_PARAMS(
82 BOOST_PP_SUB(BOOST_PARAMETER_COMPOSE_MAX_ARITY, N)
83 , ::boost::parameter::aux::void_reference() BOOST_PP_INTERCEPT
88 #undef BOOST_PARAMETER_arg_list
89 #undef BOOST_PARAMETER_close_list
90 #undef BOOST_PARAMETER_open_list