I have problem with std.range.take function and forward range with disabled postblit and I don't understand is it my or library bug?
Problem with using struct ranges with @disabled this(this) with some range functions
Uranuz via Digitalmars-d-learn Tue, 01 Sep 2015 23:30:34 -0700
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 or not. As I think for at least
*forward* ranges that are structs we must always use save methot
to store new cursor. But for *input* ranges it is not possible,
so there maybe plain copying could be allowed. I thing that we
should work out some descision on this problem, provide some
unittests for different types of ranges with and without postblit
for standard Phobos functions and fix them accordingly.
- Problem with using struct ranges with ... Uranuz via Digitalmars-d-learn
- Re: Problem with using struct ran... Mike Parker via Digitalmars-d-learn
- Re: Problem with using struct... Uranuz via Digitalmars-d-learn
- Re: Problem with using st... anonymous via Digitalmars-d-learn