|
Boost : |
From: Joel de Guzman (joel_at_[hidden])
Date: 2008-07-16 02:48:03
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:
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk