[Issue 8057] std.algorithm.move cannot use for nested struct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 3 12:35:33 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8057
Denis Shelomovskij <verylonglogin.reg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |verylonglogin.reg at gmail.com
--- Comment #3 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2012-11-03 22:35:32 MSK ---
S's destructor is incorrect, as you always can set `S s = S.init` and the
destructor must process that correctly. Corrected destructor variant:
---
~this()
{
+ // Struct always can equal to its `init` <- added
+ if(this == S.init) return; <- added
// Access to enclosing scope
assert(n == 10); // Line11
}
---
--
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