Lars Gullik Bj�nnes wrote:
> I wonder if std::count could be used here :-)
> 
>          std::count_if(par.begin() + first, par.begin() + last,
>                        bind(&Paragraph::isSeparator, &par, _1));
> 
> but probably not since we are not using iterators here.

Lars, I'm shocked (and smiling ;-) You have missed a trick! We could 
use boost's iterator adaptors or whatever they're called. One of them 
works perfectly for such cases.

Angus (returning to the safety of the trenches)

Reply via email to