Boost logo

Boost :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-06-23 13:47:03

Vincent Poinot wrote:
> shunsuke wrote:
>> Vincent Poinot wrote:
>>> As you can see, the available comparison function objects operates on
>>> objects X, the deref() helper function creates a new function object that
>>> will call the original less<>() after dereferencing its arguments,
>>> allowing sort() to work as expected.
>> It seems boost::indirect_fun?
> You are right, I was not aware of this...
> However, a remark: the example I gave in my first post using accumulate()
> does not work with make_indirect_fun():
> X sum = accumulate(v.begin(), v.end(), X(), deref<X*>(plus<X>())) ;

How about boost::indirect_iterator?

Shunsuke Sogame

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