
AMDG Markus Werle wrote:
<snip>
Re: the _argN transforms ...
I assumed they were generated by a macro until BOOST_PROTO_MAX_ARITY ... I was preaching against that (inexistent?) macro. Now I took a look at proto_fwd.hpp and found they are made by hand and stop at 9. So now I really have a problem: what happens if I need an arity of 120?
Ha! I imaging you'll need longer than the heat death of the universe to compile your program,
If you have an arity grater than 120 you should be using sequence algorithms like fold. _arg1, _arg2, &c. work fine up to a certain point, but I would run screaming in terror if I saw a program that hard coded _arg412 e.g. struct EvilTransform : or_< when_<nary_expr<tag::plus, vararg<_> >, _make_plus(_arg231, _arg125) >, when_<nary_expr<tag::minus, vararg<_> >, _make_minus(_arg34, _arg371) >, otherwise<_make_modulus(_arg19, _arg98)> > {}; In Christ, Steven Watanabe