Same problem, for structs with impure postblit.
I think those functions should be templatized. Or maybe we can remove pure at all and add a unittest to force test against pure structs.
------
import std.experimental.all;
int i;
void main()
{
Range r;
r.array().writeln;
}
struct Simple
{
@disable this(); // Without this, it works.
this(this) { i++; }
private:
this(int tmp) { }
}
struct Range
{
@property Simple front() { return S(0); }
void popFront() { count++; }
@property empty() { return count < 3; }
size_t count;
}
Comment #5 by b2.temp — 2018-08-25T20:58:33Z
*** Issue 18992 has been marked as a duplicate of this issue. ***