16 Jul 04:53
Re: [fusion] constructing all elements of the fusion vector with the same argument
From: Joel de Guzman <joel <at> boost-consulting.com>
Subject: Re: [fusion] constructing all elements of the fusion vector with the same argument
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-07-16 02:53:11 GMT
Subject: Re: [fusion] constructing all elements of the fusion vector with the same argument
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-07-16 02:53:11 GMT
Stjepan Rajko wrote: >> 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? I Love it! I think this should be an official part of Fusion. There are some matters though that we should consider very well: 1) The concept of an infinite-sequence. I'm not quite happy that all sequences has a finite size. Perhaps we can return something like fusion::infinite_size for size for such kind of sequences. We'll have to tweak the library though to cater to these kinds of sequences. IFAIR, these size checks are only done with algos dealing with 2 sequences and one sequence need to have equal or more elements than the other. Better check on this one. If this is possible, then we should have a new infinite-sequence concept. I wonder where and how that will fit in the fusion concepts hierarchy. 2) If this is not possible, then the interface should at least be compatible with the at_c and at interfaces: make_lazy_sequence<MPL-N>(f); make_lazy_sequence_c<N>(f); and of course, its result_of counterparts. Then, oh well... docs. Where should we put this? views, I guess. A lazy_sequence is a kind of a view, I would say. I'll need docs before something can be an official citizen. Hmmm.. I'll add a "contributions" section for acknowledgment of these and future contributions. At any rate, amazing! THANK YOU! Regards, -- -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
(I used the
> triple.cpp example as a starting point, it was pretty straightforward)
>
> What do you think?
I Love it! I think this should be an official part of Fusion.
There are some matters though that we should consider
very well:
1) The concept of an infinite-sequence.
I'm not quite happy that all sequences has a finite size.
Perhaps we can return something like fusion::infinite_size
for size for such kind of sequences. We'll have to tweak the
library though to cater to these kinds of sequences. IFAIR,
these size checks are only done with algos dealing with 2
sequences and one sequence need to have equal or more elements
than the other. Better check on this one.
If this is possible, then we should have a new infinite-sequence
concept. I wonder where and how that will fit in the fusion
concepts hierarchy.
2) If this is not possible, then the interface should at least
be compatible with the at_c and at interfaces:
make_lazy_sequence<MPL-N>(f);
make_lazy_sequence_c<N>(f);
and of course, its result_of counterparts.
Then, oh well... docs. Where should we put this? views, I guess.
A lazy_sequence is a kind of a view, I would say. I'll need docs
before something can be an official citizen. Hmmm.. I'll add a
"contributions" section for acknowledgment of these and future
contributions.
At any rate, amazing! THANK YOU!
Regards,
RSS Feed