Arrays and non-copyable elements

Jack Applegame japplegame at gmail.com
Sun Jun 7 23:25:05 UTC 2020


I think it should compile.

```
struct NonCopyable {
     int a;
     this(this) @disable;
}

void main() {
     NonCopyable[] arr = [NonCopyable(1), NonCopyable(2)]; // ok
     arr ~= NonCopyable(3); // fails
}
```


More information about the Digitalmars-d-learn mailing list