[Issue 3383] newVoid

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 5 12:34:16 PDT 2011


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


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #2 from bearophile_hugs at eml.cc 2011-06-05 12:29:45 PDT ---
Nicer and cleaner:

// doesn't initialize foo1
auto foo1 = new uint[5] = void;

// initializes the dynamic array to 5, avoiding a double initialization
auto foo2 = new uint[5] = 5;

That syntax is inspired by static array syntax:
uint[5] a1 = void;
uint[5] a2 = 5;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list