Boost logo

Boost Users :

Subject: Re: [Boost-users] [accumulators] accumulator "adapters"?
From: Nat Linden (nat_at_[hidden])
Date: 2013-01-25 11:19:06


On Fri, Jan 25, 2013 at 11:05 AM, Pete Bartlett <pete_at_[hidden]> wrote:

> It would be neat if I could somehow write and “adaptor accumulator” that took this stream of optionals and then, if they are not empty, pass them to an underlying accumulator.

My impulse is to suggest implementing an iterator (or range) adapter
instead, to skip the items you don't have and dereference the ones you
do.

> (we might also define another accumulator that just counts the number of “bad” samples.

I admit I don't know how to do that in a single pass using
iterator/range adapters instead of what you propose.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net