Boost logo

Boost :

From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2008-03-10 06:25:54


I want to discuss the internal data structure expr<>:

I like the way expr<> is built regarding to the first and second
template argument: It is well thought and done to have the
expression tag as first argument and some fusion-compatible
typelist as its second argument containing the operands.

OTOH the third template argument contains redundant information:
The docs say: "Proto expression nodes are valid Fusion random-access
sequences of their children nodes."
So the information about the number of arguments is accessible via
some size<T>::type metafunction e.g. depending on


In my unfinished attempts to write a paper about ET library design
(now obsolote, thanks to Eric) I have a statement that any expression
representation taking more than 2 template arguments is wrong.

Eric, since you always have a good reason for your design:
Could you please elaborate on this?

Also I ask myself whether there was a good reason not to follow
mpl and use types to represent numbers.
I'd prefer at least some parallism to mpl here: size_t<c>?


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