16 Jul 08:48
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 06:48:03 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 06:48:03 GMT
David Abrahams wrote: > on Tue Jul 15 2008, Joel de Guzman <joel-AT-boost-consulting.com> wrote: > >> 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. > > Where does that restriction come from? You know you can always give > infinite sequences an (unreachable) end iterator. Here: http://tinyurl.com/4b9m8q The size(s), result_of::size<S> gives this restriction. The result should be "MPL Integral Constant. Convertible to int.". This is inherited from MPL: http://tinyurl.com/6cbx9c IMO, and we've been discussing this with Tobias and Dan offlist, both MPL and Fusion should have a more relaxed concept for infinite sequences without the "size" requirement. Or... At the very least, both MPL and Fusion forward sequences should relax the result type of size to allow a special "inf", "positive_inf" and "negative_inf" types, in addition to "Integral Constant". 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.
>
> Where does that restriction come from? You know you can always give
> infinite sequences an (unreachable) end iterator.
Here:
RSS Feed