opSlice and foreach with ranges

2011-02-17 Thread Ali Çehreli
Is that not implemented yet? TDPL mentions a very useful feature on page 381 under "12.9.1 foreach with Iteration Primitives". (Note: I am copying all of this manually; the typos are mine): It first shows a function that includes a possible "compiler rewrite" of a foreach loop: void proces

Re: opSlice and foreach with ranges

2011-02-17 Thread Jesse Phillips
Ali Çehreli Wrote: > > ... if the iterated object offers the slice operator with no arguments > lst[], __c is initialized with lst[] instead of lst. This is in order to > allow "extracting" the iteration means out of a container without > requiring the container to define the three iteration p

Re: opSlice and foreach with ranges

2011-02-17 Thread Ali Çehreli
On 02/17/2011 01:49 PM, Jesse Phillips wrote: Ali �ehreli Wrote: ... if the iterated object offers the slice operator with no arguments lst[], __c is initialized with lst[] instead of lst. This is in order to allow "extracting" the iteration means out of a container without requiring the conta