
17 Mar
2008
17 Mar
'08
9:57 p.m.
Markus Werle wrote:
a + b + c + d
has type expr<tag::plus, arg2<a tree structure> >
but I need a template function make_flat taking arbitray expressions and return expressions of type
expr<sum, args4<all args in the typelist> >
How can I do this in proto?
Do you *really* want to use proto::expr<> to hold the result, or will any Fusion sequence do? The reason I ask is because if you use expr<>, you are limited to BOOST_PROTO_MAX_ARITY elements, which is probably too low. And bumping BOOST_PROTO_MAX_ARITY gets expensive. -- Eric Niebler Boost Consulting www.boost-consulting.com