Given this:

´´´
import std.experimental.all;

void main(){}

static assert(isInputRange!(ReturnType!(produceS!(42))[]));

auto produceS(size_t param)() { return S!param(); }
struct S(size_t param)
{
    //@disable this(this);
    auto opIndex() { return produceRange!(this); }
}

auto produceRange(alias source)(){ return Range!source(); }

struct Range(alias source)
{
    size_t front();
    void popFront();
    bool empty();
}
´´´

Why disabling copying of S removes the range property of Range?

Reply via email to