Does foreach on array literal allocate?

Kagamin spam at here.lot
Fri Dec 5 03:40:14 PST 2008


Bill Baxter Wrote:

> Bummer.
> 
> Does a static-sized array initializer also allocate?
> 
> int[4] v = [1,2,3,4];
> foreach(x; v) {
>     /// ...
> }

http://d.puremagic.com/issues/show_bug.cgi?id=2356



More information about the Digitalmars-d mailing list