[Issue 7964] std.algorithm.swap is not CTFE-compatible for structs with non-trivial assignment

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 21 02:51:17 PDT 2012


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


timon.gehr at gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timon.gehr at gmx.ch


--- Comment #3 from timon.gehr at gmx.ch 2012-05-21 02:52:54 PDT ---
(In reply to comment #2)
> Changing to a Phobos bug because the error message is perfectly clear; there's
> no compiler bug here, and nothing strange going on. Priority reduced from
> critical to normal.
> 
> CTFE is complaining because std.algorithm.swap is doing a nasty hack. I'm not
> sure if the hack is really valid for structs with postblit.

Postblit has to be called when a struct is copied, but not when it is moved.

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