Auto and empty array

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 30 00:01:49 PDT 2014


"Igor"  wrote in message news:dladvaltigiapekureja at forum.dlang.org... 

> It seems a bit bloated, compared to int[] a = []. I like using 
> auto because of uniform syntax and other reasons. Is there any 
> concise way to create a new empty array with auto?

auto a = (int[]).init;


More information about the Digitalmars-d mailing list