[Issue 4247] Cannot create default-constructed struct on heap when constructor is defined

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 11 08:01:20 PDT 2010


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



--- Comment #4 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2010-09-11 08:00:51 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
> > Also, since when are structs allowed to be allocated on the heap? TDPL
> > explicitly states that structs have scoped lifetime.
> 
> I double TDPL says this. And if it says so, then it's wrong. TDPL is not a
> religious book.
> 

It's not a religious book, but since the D docs aren't kept up to date, who can
you trust? And AFAIK Andrei & Walter have both reviewed TDPL and agree with
what it states there. As for structs on the heap, I simply didn't know it was
possible to do that, so maybe I judged to quickly from what I've read. 

Whether it's legal or not is not up to me, so don't take it personal please. :)

-- 
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