On Sat, Feb 06, 2016 at 03:11:22PM +, ZombineDev via Digitalmars-d-learn
wrote:
> On Saturday, 6 February 2016 at 15:02:16 UTC, H. S. Teoh wrote:
> >On Sat, Feb 06, 2016 at 02:43:52PM +, Tofu Ninja via
> >Digitalmars-d-learn wrote:
> >>Foreach seems to work if there is an opIndex() with
On Saturday, 6 February 2016 at 15:02:16 UTC, H. S. Teoh wrote:
Not really sure, but opIndex() with no arguments is supposed to
be the current way of implement the [] slicing operator for
user-defined types. I'm not sure when foreach started
supporting that, but it's certainly a nice thing!
On Saturday, 6 February 2016 at 15:02:16 UTC, H. S. Teoh wrote:
On Sat, Feb 06, 2016 at 02:43:52PM +, Tofu Ninja via
Digitalmars-d-learn wrote:
Foreach seems to work if there is an opIndex() with no
arguments that returns a range interface, is this documented?
I can't seem to find anything
On 06.02.2016 15:43, Tofu Ninja wrote:
Foreach seems to work if there is an opIndex() with no arguments that
returns a range interface, is this documented? I can't seem to find
anything that say this is supposed to happen. I am not really
complaining, its nice, but I just didnt really expect it
On Sat, Feb 06, 2016 at 02:43:52PM +, Tofu Ninja via Digitalmars-d-learn
wrote:
> Foreach seems to work if there is an opIndex() with no arguments that
> returns a range interface, is this documented? I can't seem to find
> anything that say this is supposed to happen. I am not really
>
On Saturday, 6 February 2016 at 14:43:52 UTC, Tofu Ninja wrote:
Foreach seems to work if there is an opIndex() with no
arguments that returns a range interface, is this documented? I
can't seem to find anything that say this is supposed to
happen. I am not really complaining, its nice, but I
Foreach seems to work if there is an opIndex() with no arguments
that returns a range interface, is this documented? I can't seem
to find anything that say this is supposed to happen. I am not
really complaining, its nice, but I just didnt really expect it
because I feel like I remember this