[Issue 5700] Allow dup in nothrow functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 4 15:29:56 PST 2011


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #1 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-03-04 15:27:01 PST ---
Actually, I think that it depends. For primitives and classes, dup should
definitely be allowed. However, for structs, they'd need a postblit which was
nothrow (if they had one), and they'd all of their member variables to either
be classes or primitives or be structs which... recursion. So, you can't just
blindly make the duping of arrays nothrow, but yes, it should generally be
legal to dup arrays in nothrow functions. It's just a bit more complicated when
dealing with structs.

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