Boost logo

Boost :

Subject: [boost] [range-ex] generators
From: Neal Becker (ndbecker2_at_[hidden])
Date: 2009-02-22 09:05:16


I have a question of generate. I believe one usually wants generators to have
state. Yet, generator is passed by value. This is awkward, the workaround is
to manually specify

generate<ForwardRange, Generator&>( rng, gen );

Since Generator is the 2nd template parameter we must specify ForwardRange,
which might be complicated.

I wonder if we should have:
template<class ForwardRange, class Generator>
ForwardRange& generate( ForwardRange& rng, Generator & gen );


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk