|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-07-01 00:22:16
The functions I'm dealing with are expected to have side effects. Really
nasty ones, too, like trying to delete elements from the underlying iterator
range :).
The input caching iterator adaptor corrects the semantics (though I just
noticed a flaw in its design), so when dealing with side effects I'll just
compose the two adaptors.
Doug
On Sunday 01 July 2001 12:31, you wrote:
> On Sat, 30 Jun 2001, Douglas Gregor wrote:
> gregod> return the maximal value. However, if side effects are
> gregod> present in the dereferencing of the underlying input
>
> From the docs for transform_iterator:
>
> "If you want the resulting iterator to behave as an iterator, the result
> of the function should be solely a function of its argument."
>
> So I guess the real question is that do you have some pressing need for a
> transform iterator that can be used with a function that is not pure?
>
> Cheers,
> Jeremy
>
>
> ----------------------------------------------------------------------
> Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
> Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
> Summer Manager, AT&T Research phone: (973) 360-8185
> ----------------------------------------------------------------------
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk