[Issue 5853] Sorting SysTime: overlapping array copy
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 18 12:27:10 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5853
kennytm at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kennytm at gmail.com
--- Comment #1 from kennytm at gmail.com 2011-04-18 12:23:38 PDT ---
I believe it is the same problem as issue 5705, except now the type to swap is
a SysTime instead of a Tuple.
------------------------------------------------------------------
import std.algorithm;
import std.datetime;
import std.stdio;
void main() {
auto x = SysTime(DateTime(2011,4,4));
auto y = SysTime(DateTime(2011,4,4));
swap(x, y);
writeln("ok");
swap(x, x); // <-- throws "overlapping array copy"
writeln("ok");
}
------------------------------------------------------------------
--
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