Re: random access-range without lower-power range kinds?

2010-12-14 Thread Jesse Phillips
Lars T. Kyllingstad Wrote: > To avoid the boilerplate, you could write a mixin that defines the > iteration primitives for you. > > mixin template IterationFuncs() > { > int index; > bool empty() { return index == length; } > auto front() { return opIndex(index); } >

Re: random access-range without lower-power range kinds?

2010-12-14 Thread spir
On Tue, 14 Dec 2010 14:15:20 + (UTC) "Lars T. Kyllingstad" wrote: > On Tue, 14 Dec 2010 09:09:33 +0100, spir wrote: > > > Hello, > > > > It seems impossible to define a random-access range (opIndex + length) > > alone. In fact, I cannot have it used by the language. Am I missing > > somethi

Re: random access-range without lower-power range kinds?

2010-12-14 Thread Lars T. Kyllingstad
On Tue, 14 Dec 2010 09:09:33 +0100, spir wrote: > Hello, > > It seems impossible to define a random-access range (opIndex + length) > alone. In fact, I cannot have it used by the language. Am I missing > something? Random-access looks enough to provide fonctionality for both > input and bidirecti

Re: random access-range without lower-power range kinds?

2010-12-14 Thread Jonathan M Davis
On Tuesday 14 December 2010 00:09:33 spir wrote: > Hello, > > It seems impossible to define a random-access range (opIndex + length) > alone. In fact, I cannot have it used by the language. Am I missing > something? Random-access looks enough to provide fonctionality for both > input and bidirecti

random access-range without lower-power range kinds?

2010-12-14 Thread spir
Hello, It seems impossible to define a random-access range (opIndex + length) alone. In fact, I cannot have it used by the language. Am I missing something? Random-access looks enough to provide fonctionality for both input and bidirectional ranges without any additional method. "Lowering" for f