Dup'ing an array onto the stack

Jarrett Billingsley kb3ctd2 at yahoo.com
Sat Feb 25 12:19:20 PST 2006


"Tom S" <h3r3tic at remove.mat.uni.torun.pl> wrote in message 
news:dto984$1inu$1 at digitaldaemon.com...
> How about:
>
> char[] foo = (cast(char*)alloca(...))[0 .. bar.length];
> foo[] = bar[];
>

Huh!  Would've thought that that'd've copied the data from the original 
alloca'd buffer, but now that I think about it, I guess it wouldn't. 





More information about the Digitalmars-d-learn mailing list