November 07, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=9334


Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg@gmail.com


--- Comment #3 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-11-07 21:29:18 MSK ---
(In reply to comment #2)
> Note, this is not about optimizing, because
> 
> auto foo()
> {
>     S* s = new S(1);
> }
> 
> have no reason to create a temporary struct and than call destructor on it.

Think deeper. Unlike C++, you can't initialize structs in D like this: `S
s(...);`. And it isn't documented that `S s = S(...);` will not create
temporaries. See Issue 9002.

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