From: Powell, Gary (powellg_at_[hidden])
Date: 2004-03-03 18:27:00
>> It sure would've been nice to be able to write _2.count, or count(_2), or
>> _2.count(), but we can't, so we bind(). ;-) The regular syntax has its
>> advantages, and the initial "member pointer first" surprise is a one-time
>It's an issue of how far the language is, mentally, from the domain
>abstraction it represents.
>maps more directly to
>does. For me.
Ahhhh, Now I understand what you want. That's no problem at all. I thought you wanted to be able to do this,
vector<X *> xs
unsigned long n = accumulate(xs.begin(),
_1 + _2->count );
where the operator->() of the class LamdaPlaceHolder<2>, returns a lambda object that has a member pointer to "count". Hence my confusion about your earlier email.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk