Re: Problem with using struct ranges with @disabled this(this) with some range functions

2015-09-02 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 2 September 2015 at 06:28:52 UTC, Uranuz wrote: As far as I understand to save current cursor of forward range I should always use *save* property. But sometimes range struct is just copied using postblit without using save (it happens even in Phobos). Is it correct behaviour to

Re: Problem with using struct ranges with @disabled this(this) with some range functions

2015-09-02 Thread Uranuz via Digitalmars-d-learn
On Wednesday, 2 September 2015 at 07:34:15 UTC, Mike Parker wrote: On Wednesday, 2 September 2015 at 06:28:52 UTC, Uranuz wrote: As far as I understand to save current cursor of forward range I should always use *save* property. But sometimes range struct is just copied using postblit without

Problem with using struct ranges with @disabled this(this) with some range functions

2015-09-02 Thread Uranuz via Digitalmars-d-learn
As far as I understand to save current cursor of forward range I should always use *save* property. But sometimes range struct is just copied using postblit without using save (it happens even in Phobos). Is it correct behaviour to *pass ownership* for range structs via just copying of range

Re: Problem with using struct ranges with @disabled this(this) with some range functions

2015-09-02 Thread anonymous via Digitalmars-d-learn
On Wednesday 02 September 2015 09:52, Uranuz wrote: > I want to understand if we have *save* method in Forward Range > then why or in which cases we should use plain struct copying > instead. Should we assume that these two ways are equal or not? No, don't assume that they're the same. > Also