
15 Jul
2008
15 Jul
'08
5:39 p.m.
On Tue, Jul 15, 2008 at 3:49 AM, Joel de Guzman <joel@boost-consulting.com> wrote:
If we have a /lazy-sequence/ s, that generates the ones for you, then you can use that for s:
vector<int, float, double> ones(all_ones);
all_ones is a lazy-sequence. It generates the ones every time the iterator is dereferenced.
A nice strategy is to write a function adaptor that creates a fusion sequence. Example:
int one() {return 1}
...
vector<int, float, double> ones(fusion::make_lazy_sequence(&one));
[snip]
How about hacking on the /lazy_sequence/ idea? Thoughts?
I *love it*. Attached is something... similar ;-) (I used the triple.cpp example as a starting point, it was pretty straightforward) What do you think? Stjepan