xxxxxxxxxx
import std.stdio : writeln;
import std.range : ElementType;
struct S {
void opIndexAssign(X, RANGE)(X x, RANGE range)
if (is(ElementType!RANGE : size_t))
{
writeln(__FUNCTION__);
}
auto opSlice(size_t dim)(size_t start, size_t end) {
import std.range : iota;
return iota(start, end);
}
}
void main()
{
auto arr = new int[7];
S s;
s.opIndexAssign(arr[1..4], s.opSlice!0(0,3));
s[0..3] = arr[1..4];
}