www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9002] New: Document that `S s = S(...);` will not create temporaries

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

           Summary: Document that `S s = S(...);` will not create
                    temporaries
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



13:47:32 MSK ---
Unlike C++, you can't initialize structs in D like this: `S s(...);`.

Documentation should be clear that `S s = S(...);` will not create temporaries
i.e. will not call postblit or destructor.

E.g. without such notes one can't be sure regular initialization will compile
for a struct with disabled postblit.

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