Range of uncopyable elements
RazvanN via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Dec 8 08:22:59 PST 2016
Hi,
I am trying to create a range with uncopyable elements. My
thought process was the following:
1.I have created a struct :
struct S
{
int a;
@disable this(this);
}
2. I declared an array :
S[] arr = [S(1), S(2), S(3)];
expecting that arr will be a range like, for example, an int[].
I was surprised to see that isInputRange!arr is false.
So, is there any possibility to create a range with uncopyable
elements?
More information about the Digitalmars-d-learn
mailing list