Update contrib.
1 // Copyright Daniel Wallin 2006. Use, modification and distribution is
2 // subject to the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef BOOST_PARAMETER_PREPROCESSOR_060206_HPP
6 # define BOOST_PARAMETER_PREPROCESSOR_060206_HPP
8 # include <boost/parameter/parameters.hpp>
9 # include <boost/parameter/binding.hpp>
10 # include <boost/parameter/match.hpp>
12 # include <boost/parameter/aux_/parenthesized_type.hpp>
13 # include <boost/parameter/aux_/cast.hpp>
14 # include <boost/parameter/aux_/preprocessor/flatten.hpp>
16 # include <boost/preprocessor/repetition/repeat_from_to.hpp>
17 # include <boost/preprocessor/control/if.hpp>
18 # include <boost/preprocessor/control/expr_if.hpp>
19 # include <boost/preprocessor/repetition/enum_params.hpp>
20 # include <boost/preprocessor/repetition/enum_binary_params.hpp>
21 # include <boost/preprocessor/repetition/enum_trailing.hpp>
22 # include <boost/preprocessor/seq/first_n.hpp>
23 # include <boost/preprocessor/seq/for_each_product.hpp>
24 # include <boost/preprocessor/seq/for_each_i.hpp>
25 # include <boost/preprocessor/tuple/elem.hpp>
26 # include <boost/preprocessor/seq/fold_left.hpp>
27 # include <boost/preprocessor/seq/size.hpp>
28 # include <boost/preprocessor/seq/enum.hpp>
30 # include <boost/preprocessor/detail/is_nullary.hpp>
32 # include <boost/mpl/always.hpp>
33 # include <boost/mpl/apply_wrap.hpp>
35 # if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
36 # include <boost/type.hpp>
39 namespace boost { namespace parameter { namespace aux {
41 # ifndef BOOST_NO_SFINAE
43 // Given Match, which is "void x" where x is an argument matching
44 // criterion, extract a corresponding MPL predicate.
45 template <class Match>
46 struct unwrap_predicate;
50 struct unwrap_predicate<void*>
52 typedef mpl::always<mpl::true_> type;
55 #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))
57 typedef void* voidstar;
59 // A matching predicate is explicitly specified
60 template <class Predicate>
61 struct unwrap_predicate<voidstar (Predicate)>
63 typedef Predicate type;
68 // A matching predicate is explicitly specified
69 template <class Predicate>
70 struct unwrap_predicate<void *(Predicate)>
72 typedef Predicate type;
78 // A type to which the argument is supposed to be convertible is
80 template <class Target>
81 struct unwrap_predicate<void (Target)>
83 typedef is_convertible<mpl::_, Target> type;
86 // Recast the ParameterSpec's nested match metafunction as a free metafunction
89 , BOOST_PP_ENUM_BINARY_PARAMS(
90 BOOST_PARAMETER_MAX_ARITY, class A, = boost::parameter::void_ BOOST_PP_INTERCEPT
94 : Parameters::template match<
95 BOOST_PP_ENUM_PARAMS(BOOST_PARAMETER_MAX_ARITY, A)
100 # if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
102 // Function template argument deduction does many of the same things
103 // as type matching during partial specialization, so we call a
104 // function template to "store" T into the type memory addressed by
107 msvc_store_type<T,void*(*)(void**(T))>
108 msvc_store_predicate_type(void*(*)(void**(T)));
111 msvc_store_type<boost::is_convertible<mpl::_,T>,void*(*)(void*(T))>
112 msvc_store_predicate_type(void*(*)(void*(T)));
114 template <class FunctionType>
115 struct unwrap_predicate
117 static FunctionType f;
119 // We don't want the function to be evaluated, just instantiated,
120 // so protect it inside of sizeof.
121 enum { dummy = sizeof(msvc_store_predicate_type(f)) };
123 // Now pull the type out of the instantiated base class
124 typedef typename msvc_type_memory<FunctionType>::storage::type type;
128 struct unwrap_predicate<void*(*)(void**)>
130 typedef mpl::always<mpl::true_> type;
139 , BOOST_PP_ENUM_BINARY_PARAMS(
140 BOOST_PARAMETER_MAX_ARITY, class A, = boost::parameter::void_ BOOST_PP_INTERCEPT
145 typedef typename make_arg_list<
146 typename BOOST_PARAMETER_build_arg_list(
147 BOOST_PARAMETER_MAX_ARITY, make_items, typename Parameters::parameter_spec, A
149 , typename Parameters::deduced_list
155 # if 1 //BOOST_WORKAROUND(BOOST_MSVC, < 1300)
156 // Works around VC6 problem where it won't accept rvalues.
158 T& as_lvalue(T& value, long)
164 T const& as_lvalue(T const& value, int)
171 # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
172 || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
174 template <class Predicate, class T, class Args>
175 struct apply_predicate
178 mpl::and_<mpl::false_,T>
181 typedef typename mpl::if_<
182 typename mpl::apply2<Predicate,T,Args>::type
189 struct funptr_predicate
193 template <class T, class Args, class P0>
194 static typename apply_predicate<P0,T,Args>::type
195 check_predicate(type<T>, Args*, void**(*)(P0));
197 template <class T, class Args, class P0>
198 static typename mpl::if_<
202 >::type check_predicate(type<T>, Args*, void*(*)(P0));
204 template <class T, class Args>
207 BOOST_STATIC_CONSTANT(bool, result =
208 sizeof(check_predicate(boost::type<T>(), (Args*)0, &p)) == 1
211 typedef mpl::bool_<apply<T,Args>::result> type;
216 struct funptr_predicate<void**>
217 : mpl::always<mpl::true_>
222 }}} // namespace boost::parameter::aux
224 # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
225 // From Paul Mensonides
226 # define BOOST_PARAMETER_IS_NULLARY(x) \
227 BOOST_PP_SPLIT(1, BOOST_PARAMETER_IS_NULLARY_C x BOOST_PP_COMMA() 0) \
229 # define BOOST_PARAMETER_IS_NULLARY_C() \
230 ~, 1 BOOST_PP_RPAREN() \
231 BOOST_PP_TUPLE_EAT(2) BOOST_PP_LPAREN() ~ \
234 # define BOOST_PARAMETER_IS_NULLARY(x) BOOST_PP_IS_NULLARY(x)
237 # define BOOST_PARAMETER_MEMBER_FUNCTION_CHECK_STATIC_static ()
238 # define BOOST_PARAMETER_MEMBER_FUNCTION_IS_STATIC(name) \
239 BOOST_PARAMETER_IS_NULLARY( \
240 BOOST_PP_CAT(BOOST_PARAMETER_MEMBER_FUNCTION_CHECK_STATIC_,name) \
243 # if !defined(BOOST_MSVC)
244 # define BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_static
245 # define BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC(name) \
246 BOOST_PP_CAT(BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_, name)
248 // Workaround for MSVC preprocessor.
250 // When stripping static from "static f", msvc will produce
251 // " f". The leading whitespace doesn't go away when pasting
252 // the token with something else, so this thing is a hack to
253 // strip the whitespace.
254 # define BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_static (
255 # define BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_AUX(name) \
256 BOOST_PP_CAT(BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_, name))
257 # define BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC(name) \
259 BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_AUX(name) \
263 # define BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(name) \
265 BOOST_PARAMETER_MEMBER_FUNCTION_IS_STATIC(name) \
269 # define BOOST_PARAMETER_MEMBER_FUNCTION_NAME(name) \
271 BOOST_PARAMETER_MEMBER_FUNCTION_IS_STATIC(name) \
272 , BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC \
273 , name BOOST_PP_TUPLE_EAT(1) \
276 // Calculates [begin, end) arity range.
278 # define BOOST_PARAMETER_ARITY_RANGE_M_optional(state) state
279 # define BOOST_PARAMETER_ARITY_RANGE_M_deduced_optional(state) state
280 # define BOOST_PARAMETER_ARITY_RANGE_M_required(state) BOOST_PP_INC(state)
281 # define BOOST_PARAMETER_ARITY_RANGE_M_deduced_required(state) BOOST_PP_INC(state)
283 # define BOOST_PARAMETER_ARITY_RANGE_M(s, state, x) \
285 BOOST_PARAMETER_ARITY_RANGE_M_ \
286 , BOOST_PARAMETER_FN_ARG_QUALIFIER(x) \
290 # define BOOST_PARAMETER_ARITY_RANGE(args) \
292 BOOST_PP_SEQ_FOLD_LEFT(BOOST_PARAMETER_ARITY_RANGE_M, 0, args) \
293 , BOOST_PP_INC(BOOST_PP_SEQ_SIZE(args)) \
297 // Accessor macros for the argument specs tuple.
298 # define BOOST_PARAMETER_FN_ARG_QUALIFIER(x) \
299 BOOST_PP_TUPLE_ELEM(4,0,x)
302 # define BOOST_PARAMETER_FN_ARG_NAME(x) \
303 BOOST_PP_TUPLE_ELEM(4,1,x)
306 # define BOOST_PARAMETER_FN_ARG_PRED(x) \
307 BOOST_PP_TUPLE_ELEM(4,2,x)
310 # define BOOST_PARAMETER_FN_ARG_DEFAULT(x) \
311 BOOST_PP_TUPLE_ELEM(4,3,x)
314 # define BOOST_PARAMETETER_FUNCTION_EAT_KEYWORD_QUALIFIER_out(x)
315 # define BOOST_PARAMETETER_FUNCTION_EAT_KEYWORD_QUALIFIER_in_out(x)
317 // Returns 1 if x is either "out(k)" or "in_out(k)".
318 # define BOOST_PARAMETER_FUNCTION_IS_KEYWORD_QUALIFIER(x) \
320 BOOST_PP_CAT(BOOST_PARAMETETER_FUNCTION_EAT_KEYWORD_QUALIFIER_, x) \
324 # define BOOST_PARAMETETER_FUNCTION_GET_KEYWORD_QUALIFIER_out(x) x
325 # define BOOST_PARAMETETER_FUNCTION_GET_KEYWORD_QUALIFIER_in_out(x) x
326 # define BOOST_PARAMETER_FUNCTION_KEYWORD_GET(x) \
327 BOOST_PP_CAT(BOOST_PARAMETETER_FUNCTION_GET_KEYWORD_QUALIFIER_, x)
330 // Returns the keyword of x, where x is either a keyword qualifier
337 # define BOOST_PARAMETER_FUNCTION_KEYWORD(x) \
339 BOOST_PARAMETER_FUNCTION_IS_KEYWORD_QUALIFIER(x) \
340 , BOOST_PARAMETER_FUNCTION_KEYWORD_GET \
341 , x BOOST_PP_TUPLE_EAT(1) \
345 # define BOOST_PARAMETER_FN_ARG_KEYWORD(x) \
346 BOOST_PARAMETER_FUNCTION_KEYWORD( \
347 BOOST_PARAMETER_FN_ARG_NAME(x) \
350 // Builds forwarding functions.
352 # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_TEMPLATE_Z(z, n) \
353 template<BOOST_PP_ENUM_PARAMS_Z(z, n, class ParameterArgumentType)>
356 # ifndef BOOST_NO_SFINAE
357 # define BOOST_PARAMETER_FUNCTION_FWD_MATCH_Z(z, name, parameters, n) \
358 , typename boost::parameter::aux::match< \
359 parameters, BOOST_PP_ENUM_PARAMS(n, ParameterArgumentType) \
360 >::type boost_parameter_enabler_argument = parameters()
362 # define BOOST_PARAMETER_FUNCTION_FWD_MATCH_Z(z, name, parameters, n)
366 # define BOOST_PARAMETER_FUNCTION_PARAMETERS_NAME(base) \
368 boost_param_parameters_ \
369 , BOOST_PP_CAT(__LINE__, BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base)) \
372 // Produce a name for a result type metafunction for the function
374 # define BOOST_PARAMETER_FUNCTION_RESULT_NAME(base) \
376 boost_param_result_ \
377 , BOOST_PP_CAT(__LINE__,BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base)) \
380 // Can't do boost_param_impl_ ## basee because base might start with an underscore
381 // daniel: what? how is that relevant? the reason for using CAT() is to make sure
382 // base is expanded. i'm not sure we need to here, but it's more stable to do it.
383 # define BOOST_PARAMETER_IMPL(base) \
384 BOOST_PP_CAT(boost_param_impl,BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base))
386 # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION00(z, n, r, data, elem) \
389 , BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_TEMPLATE_Z, BOOST_PP_TUPLE_EAT(2) \
391 BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(BOOST_PP_TUPLE_ELEM(7,3,data)) \
393 BOOST_PP_EXPR_IF(n, typename) \
394 BOOST_PARAMETER_FUNCTION_RESULT_NAME(BOOST_PP_TUPLE_ELEM(7,3,data))< \
395 BOOST_PP_EXPR_IF(n, typename) \
396 boost::parameter::aux::argument_pack< \
397 BOOST_PARAMETER_FUNCTION_PARAMETERS_NAME(BOOST_PP_TUPLE_ELEM(7,3,data)) \
398 BOOST_PP_COMMA_IF(n) \
400 n, BOOST_PP_SEQ_ENUM, BOOST_PP_TUPLE_EAT(1) \
404 BOOST_PARAMETER_MEMBER_FUNCTION_NAME(BOOST_PP_TUPLE_ELEM(7,3,data))( \
407 , BOOST_PP_SEQ_FOR_EACH_I_R \
408 , BOOST_PP_TUPLE_EAT(4) \
411 , BOOST_PARAMETER_FUNCTION_ARGUMENT \
415 BOOST_PP_IF(n, BOOST_PARAMETER_FUNCTION_FWD_MATCH_Z, BOOST_PP_TUPLE_EAT(4))( \
417 , BOOST_PP_TUPLE_ELEM(7,3,data) \
418 , BOOST_PARAMETER_FUNCTION_PARAMETERS_NAME(BOOST_PP_TUPLE_ELEM(7,3,data)) \
421 ) BOOST_PP_EXPR_IF(BOOST_PP_TUPLE_ELEM(7,4,data), const) \
423 return BOOST_PARAMETER_IMPL(BOOST_PP_TUPLE_ELEM(7,3,data))( \
424 BOOST_PARAMETER_FUNCTION_PARAMETERS_NAME(BOOST_PP_TUPLE_ELEM(7,3,data))()( \
425 BOOST_PP_ENUM_PARAMS_Z(z, n, a) \
431 # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION0(r, data, elem) \
432 BOOST_PARAMETER_FUNCTION_FWD_FUNCTION00( \
433 BOOST_PP_TUPLE_ELEM(7,0,data) \
434 , BOOST_PP_TUPLE_ELEM(7,1,data) \
441 # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_ARITY_0(z, n, data) \
442 BOOST_PARAMETER_FUNCTION_FWD_FUNCTION00( \
443 z, n, BOOST_PP_DEDUCE_R() \
444 , (z, n, BOOST_PP_TUPLE_REM(5) data) \
449 # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_ARITY_N(z, n, data) \
450 BOOST_PP_SEQ_FOR_EACH( \
451 BOOST_PARAMETER_FUNCTION_FWD_FUNCTION0 \
452 , (z, n, BOOST_PP_TUPLE_REM(5) data) \
453 , BOOST_PP_SEQ_FOR_EACH_PRODUCT( \
454 BOOST_PARAMETER_FUNCTION_FWD_PRODUCT \
455 , BOOST_PP_SEQ_FIRST_N( \
456 n, BOOST_PP_TUPLE_ELEM(5,3,data) \
462 # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION(z, n, data) \
465 , BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_ARITY_N \
466 , BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_ARITY_0 \
470 # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS0( \
471 result,name,args,const_,combinations,range \
473 BOOST_PP_REPEAT_FROM_TO( \
474 BOOST_PP_TUPLE_ELEM(2,0,range), BOOST_PP_TUPLE_ELEM(2,1,range) \
475 , BOOST_PARAMETER_FUNCTION_FWD_FUNCTION \
476 , (result,name,const_,combinations,BOOST_PP_TUPLE_ELEM(2,1,range)) \
480 # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS(result,name,args, const_, combinations) \
481 BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS0( \
482 result, name, args, const_, combinations, BOOST_PARAMETER_ARITY_RANGE(args) \
486 // Builds boost::parameter::parameters<> specialization
487 # define BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_optional(tag) \
490 # define BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_required(tag) \
493 # define BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_deduced_optional(tag) \
494 optional<boost::parameter::deduced<tag>
496 # define BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_deduced_required(tag) \
497 required<boost::parameter::deduced<tag>
499 # if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
501 # if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
502 # define BOOST_PARAMETER_PREDICATE_TYPE(p) void*(*) (void* p)
504 # define BOOST_PARAMETER_PREDICATE_TYPE(p) void p
507 # define BOOST_PARAMETER_FUNCTION_PARAMETERS_M(r,tag_namespace,i,elem) \
508 BOOST_PP_COMMA_IF(i) \
509 boost::parameter::BOOST_PP_CAT( \
510 BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_ \
511 , BOOST_PARAMETER_FN_ARG_QUALIFIER(elem) \
513 tag_namespace::BOOST_PARAMETER_FUNCTION_KEYWORD( \
514 BOOST_PARAMETER_FN_ARG_KEYWORD(elem) \
517 , typename boost::parameter::aux::unwrap_predicate< \
518 BOOST_PARAMETER_PREDICATE_TYPE(BOOST_PARAMETER_FN_ARG_PRED(elem)) \
521 # elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
522 # define BOOST_PARAMETER_FUNCTION_PARAMETERS_M(r,tag_namespace,i,elem) \
523 BOOST_PP_COMMA_IF(i) \
524 boost::parameter::BOOST_PP_CAT( \
525 BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_ \
526 , BOOST_PARAMETER_FN_ARG_QUALIFIER(elem) \
528 tag_namespace::BOOST_PARAMETER_FUNCTION_KEYWORD( \
529 BOOST_PARAMETER_FN_ARG_KEYWORD(elem) \
532 , boost::parameter::aux::funptr_predicate< \
533 void* BOOST_PARAMETER_FN_ARG_PRED(elem) \
536 # elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
537 # define BOOST_PARAMETER_FUNCTION_PARAMETERS_M(r,tag_namespace,i,elem) \
538 BOOST_PP_COMMA_IF(i) \
539 boost::parameter::BOOST_PP_CAT( \
540 BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_ \
541 , BOOST_PARAMETER_FN_ARG_QUALIFIER(elem) \
543 tag_namespace::BOOST_PARAMETER_FUNCTION_KEYWORD( \
544 BOOST_PARAMETER_FN_ARG_KEYWORD(elem) \
547 , boost::mpl::always<boost::mpl::true_> \
551 # define BOOST_PARAMETER_FUNCTION_PARAMETERS(tag_namespace, base, args) \
552 template <class BoostParameterDummy> \
553 struct BOOST_PP_CAT( \
554 BOOST_PP_CAT(boost_param_params_, __LINE__) \
555 , BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base) \
556 ) : boost::parameter::parameters< \
557 BOOST_PP_SEQ_FOR_EACH_I( \
558 BOOST_PARAMETER_FUNCTION_PARAMETERS_M, tag_namespace, args \
563 typedef BOOST_PP_CAT( \
564 BOOST_PP_CAT(boost_param_params_, __LINE__) \
565 , BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base) \
568 // Defines result type metafunction
569 # define BOOST_PARAMETER_FUNCTION_RESULT_ARG(z, _, i, x) \
570 BOOST_PP_COMMA_IF(i) class BOOST_PP_TUPLE_ELEM(3,1,x)
573 # define BOOST_PARAMETER_FUNCTION_RESULT_(result, name, args) \
574 template <class Args> \
575 struct BOOST_PARAMETER_FUNCTION_RESULT_NAME(name) \
577 typedef typename BOOST_PARAMETER_PARENTHESIZED_TYPE(result) type; \
580 # if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
582 # define BOOST_PARAMETER_FUNCTION_RESULT(result, name, args) \
583 BOOST_PARAMETER_FUNCTION_RESULT_(result, name, args) \
585 struct BOOST_PARAMETER_FUNCTION_RESULT_NAME(name)<int> \
586 { typedef int type; };
590 # define BOOST_PARAMETER_FUNCTION_RESULT(result, name, args) \
591 BOOST_PARAMETER_FUNCTION_RESULT_(result, name, args)
595 // Defines implementation function
596 # define BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name) \
597 template <class Args> \
598 typename BOOST_PARAMETER_FUNCTION_RESULT_NAME(name)< \
600 >::type BOOST_PARAMETER_IMPL(name)(Args const& args)
602 # define BOOST_PARAMETER_FUNCTION_IMPL_FWD(name) \
603 BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name);
606 # define BOOST_PARAMETER_FUNCTION_SPLIT_ARG_required(state, arg) \
608 BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(4, 0, state)) \
609 , BOOST_PP_SEQ_PUSH_BACK(BOOST_PP_TUPLE_ELEM(4, 1, state), arg) \
610 , BOOST_PP_TUPLE_ELEM(4, 2, state) \
611 , BOOST_PP_TUPLE_ELEM(4, 3, state) \
614 # define BOOST_PARAMETER_FUNCTION_SPLIT_ARG_deduced_required(state, arg) \
615 BOOST_PARAMETER_FUNCTION_SPLIT_ARG_required(state, arg)
617 # define BOOST_PARAMETER_FUNCTION_SPLIT_ARG_optional(state, arg) \
619 BOOST_PP_TUPLE_ELEM(4, 0, state) \
620 , BOOST_PP_TUPLE_ELEM(4, 1, state) \
621 , BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(4, 2, state)) \
622 , BOOST_PP_SEQ_PUSH_BACK(BOOST_PP_TUPLE_ELEM(4, 3, state), arg) \
625 # define BOOST_PARAMETER_FUNCTION_SPLIT_ARG_deduced_optional(state, arg) \
626 BOOST_PARAMETER_FUNCTION_SPLIT_ARG_optional(state, arg)
628 # define BOOST_PARAMETER_FUNCTION_SPLIT_ARG(s, state, arg) \
630 BOOST_PARAMETER_FUNCTION_SPLIT_ARG_ \
631 , BOOST_PARAMETER_FN_ARG_QUALIFIER(arg) \
634 // Returns (required_count, required, optional_count, optionals) tuple
635 # define BOOST_PARAMETER_FUNCTION_SPLIT_ARGS(args) \
636 BOOST_PP_SEQ_FOLD_LEFT( \
637 BOOST_PARAMETER_FUNCTION_SPLIT_ARG \
638 , (0,BOOST_PP_SEQ_NIL, 0,BOOST_PP_SEQ_NIL) \
642 # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG_NAME(keyword) \
643 BOOST_PP_CAT(BOOST_PP_CAT(keyword,_),type)
645 // Helpers used as parameters to BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS.
646 # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_TEMPLATE_ARG(r, _, arg) \
647 , class BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG_NAME( \
648 BOOST_PARAMETER_FN_ARG_KEYWORD(arg) \
651 # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG(r, _, arg) \
652 , BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG_NAME( \
653 BOOST_PARAMETER_FN_ARG_KEYWORD(arg) \
654 )& BOOST_PARAMETER_FN_ARG_KEYWORD(arg)
656 # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_PARAMETER(r, _, arg) \
657 , BOOST_PARAMETER_FN_ARG_KEYWORD(arg)
659 // Produces a name for the dispatch functions.
660 # define BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name) \
662 boost_param_default_ \
663 , BOOST_PP_CAT(__LINE__, BOOST_PARAMETER_MEMBER_FUNCTION_NAME(name)) \
666 // Helper macro used below to produce lists based on the keyword argument
667 // names. macro is applied to every element. n is the number of
668 // optional arguments that should be included.
669 # define BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS(macro, n, split_args) \
670 BOOST_PP_SEQ_FOR_EACH( \
673 , BOOST_PP_TUPLE_ELEM(4,1,split_args) \
675 BOOST_PP_SEQ_FOR_EACH( \
678 , BOOST_PP_SEQ_FIRST_N( \
679 BOOST_PP_SUB(BOOST_PP_TUPLE_ELEM(4,2,split_args), n) \
680 , BOOST_PP_TUPLE_ELEM(4,3,split_args) \
684 // Generates a keyword | default expression.
685 # define BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_DEFAULT(arg, tag_namespace) \
686 boost::parameter::keyword< \
687 tag_namespace::BOOST_PARAMETER_FN_ARG_KEYWORD(arg) \
688 >::get() | boost::parameter::aux::use_default_tag()
690 # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_GET_ARG(arg, tag_ns) \
691 BOOST_PARAMETER_FUNCTION_CAST( \
693 BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_DEFAULT( \
697 , BOOST_PARAMETER_FN_ARG_PRED(arg) \
700 # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_BODY(name, n, split_args, tag_namespace) \
702 return BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \
706 BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \
707 BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_PARAMETER \
711 , BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_GET_ARG( \
713 BOOST_PP_SUB(BOOST_PP_TUPLE_ELEM(4,2,split_args), n) \
714 , BOOST_PP_TUPLE_ELEM(4,3,split_args) \
721 # define BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_ACTUAL_DEFAULT(arg) \
722 BOOST_PARAMETER_FUNCTION_CAST( \
723 boost::parameter::aux::as_lvalue(BOOST_PARAMETER_FN_ARG_DEFAULT(arg), 0L) \
724 , BOOST_PARAMETER_FN_ARG_PRED(arg) \
727 # define BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_DEFAULT_BODY(name, n, split_args, tag_ns, const_) \
731 BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \
732 BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_TEMPLATE_ARG \
737 BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(name) \
738 ResultType BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \
742 BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \
743 BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG \
747 , boost::parameter::aux::use_default_tag \
748 ) BOOST_PP_EXPR_IF(const_, const) \
750 return BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \
754 BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \
755 BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_PARAMETER \
759 , BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_ACTUAL_DEFAULT( \
761 BOOST_PP_SUB(BOOST_PP_TUPLE_ELEM(4,2,split_args), BOOST_PP_INC(n)) \
762 , BOOST_PP_TUPLE_ELEM(4,3,split_args) \
768 // Produces a forwarding layer in the default evaluation machine.
772 // (name, split_args)
774 // Where name is the base name of the function, and split_args is a tuple:
776 // (required_count, required_args, optional_count, required_args)
780 // defines the actual function body for BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION below.
781 # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION0(z, n, data) \
785 BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \
786 BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_TEMPLATE_ARG \
788 , BOOST_PP_TUPLE_ELEM(5,1,data) \
791 BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(BOOST_PP_TUPLE_ELEM(5,0,data)) \
792 ResultType BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(BOOST_PP_TUPLE_ELEM(5,0,data))( \
796 BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \
797 BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG \
799 , BOOST_PP_TUPLE_ELEM(5,1,data) \
801 ) BOOST_PP_EXPR_IF(BOOST_PP_TUPLE_ELEM(5,2,data), const) \
804 , BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_BODY \
805 , ; BOOST_PP_TUPLE_EAT(4) \
807 BOOST_PP_TUPLE_ELEM(5,0,data) \
809 , BOOST_PP_TUPLE_ELEM(5,1,data) \
810 , BOOST_PP_TUPLE_ELEM(5,3,data) \
813 # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION(z, n, data) \
817 , BOOST_PP_TUPLE_ELEM(5,4,data) \
819 , BOOST_PP_TUPLE_EAT(3) \
820 , BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION0 \
823 BOOST_PP_EQUAL(n, BOOST_PP_TUPLE_ELEM(4,2,BOOST_PP_TUPLE_ELEM(5,1,data))) \
824 , BOOST_PP_TUPLE_EAT(5) \
825 , BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_DEFAULT_BODY \
827 BOOST_PP_TUPLE_ELEM(5,0,data) \
829 , BOOST_PP_TUPLE_ELEM(5,1,data) \
830 , BOOST_PP_TUPLE_ELEM(5,3,data) \
831 , BOOST_PP_TUPLE_ELEM(5,2,data) \
834 # define BOOST_PARAMETER_FUNCTION_DEFAULT_GET_ARG(r, tag_ns, arg) \
835 , BOOST_PARAMETER_FUNCTION_CAST( \
837 boost::parameter::keyword<tag_ns::BOOST_PARAMETER_FN_ARG_KEYWORD(arg)>::get() \
839 , BOOST_PARAMETER_FN_ARG_PRED(arg) \
842 // Generates the function template that recives a ArgumentPack, and then
843 // goes on to call the layers of overloads generated by
844 // BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER.
845 # define BOOST_PARAMETER_FUNCTION_INITIAL_DISPATCH_FUNCTION(name, split_args, const_, tag_ns) \
846 template <class Args> \
847 typename BOOST_PARAMETER_FUNCTION_RESULT_NAME(name)<Args>::type \
848 BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(name) \
849 BOOST_PARAMETER_IMPL(name)(Args const& args) BOOST_PP_EXPR_IF(const_, const) \
851 return BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \
852 (typename BOOST_PARAMETER_FUNCTION_RESULT_NAME(name)<Args>::type(*)())0 \
856 BOOST_PP_SEQ_FOR_EACH( \
857 BOOST_PARAMETER_FUNCTION_DEFAULT_GET_ARG \
859 , BOOST_PP_TUPLE_ELEM(4,1,split_args) \
865 // Helper for BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER below.
866 # define BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER_AUX( \
867 name, split_args, skip_fwd_decl, const_, tag_namespace \
869 BOOST_PP_REPEAT_FROM_TO( \
871 , BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(4, 2, split_args)) \
872 , BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION \
873 , (name, split_args, const_, tag_namespace, skip_fwd_decl) \
876 BOOST_PARAMETER_FUNCTION_INITIAL_DISPATCH_FUNCTION(name, split_args, const_, tag_namespace) \
881 BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \
882 BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_TEMPLATE_ARG \
887 BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(name) \
888 ResultType BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \
892 BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \
893 BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG \
897 ) BOOST_PP_EXPR_IF(const_, const)
899 // Generates a bunch of forwarding functions that each extract
900 // one more argument.
901 # define BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER(name, args, skip_fwd_decl, const_, tag_ns) \
902 BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER_AUX( \
903 name, BOOST_PARAMETER_FUNCTION_SPLIT_ARGS(args), skip_fwd_decl, const_, tag_ns \
907 // Defines the result metafunction and the parameters specialization.
908 # define BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_namespace, args) \
909 BOOST_PARAMETER_FUNCTION_RESULT(result, name, args) \
911 BOOST_PARAMETER_FUNCTION_PARAMETERS(tag_namespace, name, args) \
912 BOOST_PARAMETER_FUNCTION_PARAMETERS_NAME(name); \
914 // Helper for BOOST_PARAMETER_FUNCTION below.
915 # define BOOST_PARAMETER_FUNCTION_AUX(result, name, tag_namespace, args) \
916 BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_namespace, args) \
917 BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name); \
919 BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS( \
920 result, name, args, 0 \
921 , BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \
924 BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER(name, args, 0, 0, tag_namespace)
926 // Defines a Boost.Parameter enabled function with the new syntax.
927 # define BOOST_PARAMETER_FUNCTION(result, name, tag_namespace, args) \
928 BOOST_PARAMETER_FUNCTION_AUX( \
929 result, name, tag_namespace \
930 , BOOST_PARAMETER_FLATTEN(3, 2, 3, args) \
934 // Defines a Boost.Parameter enabled function.
935 # define BOOST_PARAMETER_BASIC_FUNCTION_AUX(result, name, tag_namespace, args) \
936 BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_namespace, args) \
938 BOOST_PARAMETER_FUNCTION_IMPL_FWD(name) \
940 BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS( \
941 result, name, args, 0 \
942 , BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \
945 BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name)
947 # define BOOST_PARAMETER_BASIC_FUNCTION(result, name, tag_namespace, args) \
948 BOOST_PARAMETER_BASIC_FUNCTION_AUX( \
949 result, name, tag_namespace \
950 , BOOST_PARAMETER_FLATTEN(2, 2, 3, args) \
954 // Defines a Boost.Parameter enabled member function.
955 # define BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX(result, name, tag_namespace, args, const_) \
956 BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_namespace, args) \
958 BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS( \
959 result, name, args, const_ \
960 , BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \
963 BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name) BOOST_PP_EXPR_IF(const_, const) \
966 # define BOOST_PARAMETER_BASIC_MEMBER_FUNCTION(result, name, tag_namespace, args) \
967 BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX( \
968 result, name, tag_namespace \
969 , BOOST_PARAMETER_FLATTEN(2, 2, 3, args) \
974 # define BOOST_PARAMETER_BASIC_CONST_MEMBER_FUNCTION(result, name, tag_namespace, args) \
975 BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX( \
976 result, name, tag_namespace \
977 , BOOST_PARAMETER_FLATTEN(2, 2, 3, args) \
984 # define BOOST_PARAMETER_MEMBER_FUNCTION_AUX(result, name, tag_namespace, const_, args) \
985 BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_namespace, args) \
987 BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS( \
988 result, name, args, const_ \
989 , BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \
992 BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER(name, args, 1, const_, tag_namespace)
994 // Defines a Boost.Parameter enabled function with the new syntax.
995 # define BOOST_PARAMETER_MEMBER_FUNCTION(result, name, tag_namespace, args) \
996 BOOST_PARAMETER_MEMBER_FUNCTION_AUX( \
997 result, name, tag_namespace, 0 \
998 , BOOST_PARAMETER_FLATTEN(3, 2, 3, args) \
1002 # define BOOST_PARAMETER_CONST_MEMBER_FUNCTION(result, name, tag_namespace, args) \
1003 BOOST_PARAMETER_MEMBER_FUNCTION_AUX( \
1004 result, name, tag_namespace, 1 \
1005 , BOOST_PARAMETER_FLATTEN(3, 2, 3, args) \
1009 // Defines a Boost.Parameter enabled constructor.
1011 # define BOOST_PARAMETER_FUNCTION_ARGUMENT(r, _, i, elem) \
1012 BOOST_PP_COMMA_IF(i) elem& BOOST_PP_CAT(a, i)
1015 # if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
1017 // Older MSVC can't do what's necessary to handle commas in base names; just
1018 // use a typedef instead if you have a base name that contains commas.
1019 # define BOOST_PARAMETER_PARENTHESIZED_BASE(x) BOOST_PP_SEQ_HEAD(x)
1023 # define BOOST_PARAMETER_PARENTHESIZED_BASE(x) BOOST_PARAMETER_PARENTHESIZED_TYPE(x)
1027 # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR00(z, n, r, data, elem) \
1030 , BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_TEMPLATE_Z, BOOST_PP_TUPLE_EAT(2) \
1032 BOOST_PP_EXPR_IF(BOOST_PP_EQUAL(n,1), explicit) \
1033 BOOST_PP_TUPLE_ELEM(6,2,data)( \
1036 , BOOST_PP_SEQ_FOR_EACH_I_R \
1037 , BOOST_PP_TUPLE_EAT(4) \
1040 , BOOST_PARAMETER_FUNCTION_ARGUMENT \
1044 BOOST_PP_IF(n, BOOST_PARAMETER_FUNCTION_FWD_MATCH_Z, BOOST_PP_TUPLE_EAT(4))( \
1046 , BOOST_PP_TUPLE_ELEM(6,3,data) \
1047 , BOOST_PP_CAT(constructor_parameters, __LINE__) \
1051 : BOOST_PARAMETER_PARENTHESIZED_BASE(BOOST_PP_TUPLE_ELEM(6,3,data)) ( \
1052 BOOST_PP_CAT(constructor_parameters, __LINE__)()( \
1053 BOOST_PP_ENUM_PARAMS_Z(z, n, a) \
1059 # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR0(r, data, elem) \
1060 BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR00( \
1061 BOOST_PP_TUPLE_ELEM(6,0,data) \
1062 , BOOST_PP_TUPLE_ELEM(6,1,data) \
1069 # define BOOST_PARAMETER_FUNCTION_FWD_PRODUCT(r, product) \
1073 # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR_ARITY_0(z, n, data) \
1074 BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR00( \
1075 z, n, BOOST_PP_DEDUCE_R() \
1076 , (z, n, BOOST_PP_TUPLE_REM(4) data) \
1081 # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR_ARITY_N(z, n, data) \
1082 BOOST_PP_SEQ_FOR_EACH( \
1083 BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR0 \
1084 , (z, n, BOOST_PP_TUPLE_REM(4) data) \
1085 , BOOST_PP_SEQ_FOR_EACH_PRODUCT( \
1086 BOOST_PARAMETER_FUNCTION_FWD_PRODUCT \
1087 , BOOST_PP_SEQ_FIRST_N( \
1088 n, BOOST_PP_TUPLE_ELEM(4,2,data) \
1094 # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR(z, n, data) \
1097 , BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR_ARITY_N \
1098 , BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR_ARITY_0 \
1102 # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS0(class_,base,args,combinations,range) \
1103 BOOST_PP_REPEAT_FROM_TO( \
1104 BOOST_PP_TUPLE_ELEM(2,0,range), BOOST_PP_TUPLE_ELEM(2,1,range) \
1105 , BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR \
1106 , (class_,base,combinations,BOOST_PP_TUPLE_ELEM(2,1,range)) \
1110 # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS(class_,base,args,combinations) \
1111 BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS0( \
1112 class_, base, args, combinations, BOOST_PARAMETER_ARITY_RANGE(args) \
1116 # define BOOST_PARAMETER_CONSTRUCTOR_AUX(class_, base, tag_namespace, args) \
1117 BOOST_PARAMETER_FUNCTION_PARAMETERS(tag_namespace, ctor, args) \
1118 BOOST_PP_CAT(constructor_parameters, __LINE__); \
1120 BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS( \
1121 class_, base, args \
1122 , BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \
1126 # define BOOST_PARAMETER_CONSTRUCTOR(class_, base, tag_namespace, args) \
1127 BOOST_PARAMETER_CONSTRUCTOR_AUX( \
1128 class_, base, tag_namespace \
1129 , BOOST_PARAMETER_FLATTEN(2, 2, 3, args) \
1133 # ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
1134 # define BOOST_PARAMETER_FUNCTION_FWD_COMBINATION(r, _, i, elem) \
1136 BOOST_PARAMETER_FUNCTION_IS_KEYWORD_QUALIFIER( \
1137 BOOST_PARAMETER_FN_ARG_NAME(elem) \
1139 , (const ParameterArgumentType ## i)(ParameterArgumentType ## i) \
1140 , (const ParameterArgumentType ## i) \
1142 // MSVC6.5 lets us bind rvalues to T&.
1143 # elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
1144 # define BOOST_PARAMETER_FUNCTION_FWD_COMBINATION(r, _, i, elem) \
1146 BOOST_PARAMETER_FUNCTION_IS_KEYWORD_QUALIFIER( \
1147 BOOST_PARAMETER_FN_ARG_NAME(elem) \
1149 , (ParameterArgumentType ## i) \
1150 , (const ParameterArgumentType ## i) \
1152 // No partial ordering. This feature doesn't work.
1153 // This is exactly the same as for VC6.5, but we might change it later.
1155 # define BOOST_PARAMETER_FUNCTION_FWD_COMBINATION(r, _, i, elem) \
1157 BOOST_PARAMETER_FUNCTION_IS_KEYWORD_QUALIFIER( \
1158 BOOST_PARAMETER_FN_ARG_NAME(elem) \
1160 , (ParameterArgumentType ## i) \
1161 , (const ParameterArgumentType ## i) \
1165 # define BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \
1166 BOOST_PP_SEQ_FOR_EACH_I(BOOST_PARAMETER_FUNCTION_FWD_COMBINATION, ~, args)
1168 #endif // BOOST_PARAMETER_PREPROCESSOR_060206_HPP