Copying with immutable arrays

Tobias Pankrath tobias at pankrath.net
Mon Oct 29 01:06:22 PDT 2012


On Monday, 29 October 2012 at 06:19:36 UTC, Ali Çehreli wrote:
>
> Just to confirm, the above indeed works:
>
> struct SC {
>     immutable(int)* i;
> }
>
> void main()
> {
>     immutable(SC)[] arr1;
>     SC[] arr2 = arr1.dup;    // compiles
> }

Oh, I thought I've tried it.

> [snip] [Really detailed description here] [snip]

Thanks, now I've got it :-)


More information about the Digitalmars-d-learn mailing list