http://d.puremagic.com/issues/show_bug.cgi?id=4247
Maksim Zholudev <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #8 from Maksim Zholudev <[email protected]> 2013-04-15 07:09:04 PDT --- (In reply to comment #0) > So the auto s = new S is no longer usable. However, I can easily declare a > struct S on the stack, or create a new array of S. In fact, you can do: > > auto s = (new S[1])[0]; > > and achieve the desired effect, but this is oh so ugly. This code would create structure on the heap and put COPY of it to `s`. It is not the same as `auto s = new S`. The workaround should be: -------------------- auto s = (new S[1]).ptr; -------------------- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
