On Monday, 9 August 2021 at 02:47:40 UTC, Mathias LANG wrote:
On Sunday, 8 August 2021 at 18:36:02 UTC, vit wrote:
Hello, is there reason why elements of input range must be
copyable?
By design, not that I can think of. But it is assumed all over
the place, unfortunately. You can make your
On Sunday, 8 August 2021 at 18:36:02 UTC, vit wrote:
Hello, is there reason why elements of input range must be
copyable?
By design, not that I can think of. But it is assumed all over
the place, unfortunately. You can make your `front` method return
by `ref`, but you're still going to get
Hello, is there reason why elements of input range must be
copyable?
For example this example works and copy ctor is never called:
```d
import std.algorithm : map;
import std.range;
struct Foo{
int i;
this(scope ref typeof(this) rhs)pure nothrow @safe @nogc{
//this.i =