std.container.Array deep-copy?

qznc via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 10 01:00:30 PDT 2014


On Friday, 10 October 2014 at 06:27:35 UTC, yazd wrote:
> On Thursday, 9 October 2014 at 21:24:55 UTC, qznc wrote:
>> On Thursday, 9 October 2014 at 21:14:46 UTC, qznc wrote:
>>> How can you deep-copy a std.container.Array instance?
>>
>> Ok, the deep-copy problem already got resolved on reddit: Use 
>> dup.
>>
>> However, the error is still open. You cannot give an Array!X
>> argument to constructor/replace/insertBefore of Array!X 
>> instances?
>
> You will just need to slice it to provide a range.

Like the following? That did not work.

Array!Foo y = Array!Foo(x[]);


More information about the Digitalmars-d-learn mailing list