On Monday, 25 June 2012 at 17:38:55 UTC, Steven Schveighoffer wrote:

I think you misunderstand an infinite range. There are plenty of truly infinite ranges available.

An example infinite range:

struct Infinite
{
   int x;
   @property int front() { return x;}
   void popFront() {}
   enum empty = false;
}

length has nothing to do with infinite ranges. In fact, infinite ranges should have no length member.

-Steve

Oh, I see. So they're truly infinite, not just unbounded.

In that case, how do you make a random-access wrapper around an input range?
(i.e. What do you use for 'length'?)

Reply via email to