
on Fri Sep 19 2008, "Stjepan Rajko" <stipe-AT-asu.edu> wrote:
Hello,
I just started playing with an abstracted accumulate function which can be called either with a fusion sequence or a range, and calls fusion::accumulate or std::accumulate as appropriate. In using it, I ran into an interesting discrepancy: std::accumulate expects binary functions which take the accumulator as the first argument and the sequence element as the second argument. fusion::accumulate expects the arguments in reverse. This discrepancy makes the abstraction unnecessarily complicated, because the binary function has to either be able to receive the arguments in either order, or be adapted (e.g., with bind) for one of the cases. Or, I'm just missing something :-)
I consider this a Fusion bug. -- Dave Abrahams BoostPro Computing http://www.boostpro.com