[Issue 5854] Built-in array sort doesn't sort SysTime correctly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 17 19:21:31 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5854
kekeniro2 at yahoo.co.jp changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kekeniro2 at yahoo.co.jp
Component|DMD |Phobos
--- Comment #2 from kekeniro2 at yahoo.co.jp 2012-10-17 19:21:30 PDT ---
The cause is in Phobos library.(std.datetime)
Struct SysTime has some opCmp, but lacks the required one to overload.
http://dlang.org/arrays.html#array-properties
> For the .sort property to work on arrays of structs or unions, the struct or union definition must define the function: int opCmp(ref const S) const. The type S is the type of the struct or union. This function will determine the sort ordering.
# I have no idea whether DMD could print an error or not.
--
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