Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2008-03-17 17:57:46

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

Boost list run by bdawes at, gregod at, cpdaniel at, john at