[Issue 5700] Allow dup in nothrow functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 7 02:10:08 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5700
monarchdodra at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |monarchdodra at gmail.com
See Also| |http://d.puremagic.com/issu
| |es/show_bug.cgi?id=9468
--- Comment #4 from monarchdodra at gmail.com 2013-02-07 02:10:00 PST ---
(In reply to comment #1)
> 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.
Just want to point out http://d.puremagic.com/issues/show_bug.cgi?id=9468 : dup
does not call postblit.
So at this point, *that* issue needs to be fixed before dup can even try to
conditionally be nothrow (or @safe)
--
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