Boost logo

Boost :

Subject: Re: [boost] [fusion] repetitive_view
From: Joel de Guzman (joel_at_[hidden])
Date: 2009-04-12 19:30:33


Stjepan Rajko wrote:
> On Sat, Apr 11, 2009 at 5:53 PM, Joel de Guzman
> <joel_at_[hidden]> wrote:
>> Stjepan Rajko wrote:
>>> Hello,
>>>
>>> I just noticed `repetitive_view` in boost/fusion/view. It doesn't
>>> appear to be documented, but judging from the test, it appears that
>>> repetitive_view<Sequence> is an infinite repetition of the elements of
>>> the sequence. Is that correct?
>>>
>> That is Dan's baby. You should probably ask him. I think a reason
>> why it's undocumented is that the basic concepts of a "sequence"
>> requires a size. An infinite view does not have a size. We'll
>> have to refine the concepts to take in infinite views. I do like
>> your lazy_sequence idea. Please coordinate with Dan on how to
>> proceed with these infinite views.
>>
>
> OK, I'll contact Dan.
>
> I haven't worked any further on the lazy_sequence idea. I took
> Steven's suggestion from the end of the thread and just used a
> transform from mpl::range_c<int, 0, N> instead. But after using that
> a few times, I found that at least adding some syntactic sugar would
> be beneficial. So maybe providing lazy_sequence as a thin wrapper
> around a transform from mpl::range_c<int, 0, N> would be the way to
> go. And maybe the default value for N is the maximum possible, and an
> "infinite" sequence is just a finite sequence with maximum possible
> size (that can be held by int)?

Opps, sorry, my bad!!! I should give credit where credit is due and
the credit should go to Tobias. He wrote the view, not Dan. Sorry,
Tobias.

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