Duplicating multidimensional array
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Thu May 30 17:22:22 PDT 2013
On 05/31/2013 01:48 AM, Ali Çehreli wrote:
> Copying structs is trivial because they already have copy semantics:
>
> T b = a; // b is a copy of a
>
> However, that depends on correctly implemented copy semantics on T.
By "complex structs" I meant things like structs containing arrays -- a regular
copy would just copy the reference and not duplicate the arrays.
> As long there is no extra copy generated during the process, it should be fine.
> However, the usual issues around the current conservative GC applies. :/
I'll get back to you on that one when I have results ... :-)
More information about the Digitalmars-d-learn
mailing list