From: Larry Evans (cppljevans_at_[hidden])
Date: 2008-03-18 00:45:44
On 03/17/08 17:55, Eric Niebler wrote:
> Larry Evans wrote:
>> Me too!
> I couldn't tell from your email -- what are you me too-ing?
flattening a sequence of binary operators into one list
with a tag indicating the operator to be applied between
elements in the list.
>> In general, there should be an n-ary version of all the
>> binary ops.
> Do you mean, you'd like to create an expression expr<tag::plus,
> args4<A,B,C,D> > ? There's nothing stopping you from doing that today.
> The only problem is that default_context won't know what to do with it,
> but that's not big a problem ... just write your own context.
Actually, I was thinking an n-ary expression with a tag like:
For example, make_expr<reduce<tag::plus> >(1,2,3,4). The reason
for the name "reduce" is that what apl uses. Or maybe fold<BinOp>,
since that's what other boost libraries use.
>> This should also be extended to the or_ also.
>> I remember having a problem with folding or_ because it was
> IIRC, your problem was that or_ requires at least 2 parameters. I had
> agreed to change that, but haven't yet.
Yep, now I remember.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk