[Issue 5773] sort() and topN() fail on sliced/resized array of tuples

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 23 16:04:13 PDT 2011


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


kennytm at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kennytm at gmail.com


--- Comment #3 from kennytm at gmail.com 2011-03-23 16:00:52 PDT ---
(In reply to comment #1)
> Perhaps this is just me being stupid -- trying to sort things that can't be
> compared? However, if I use a custom struct (instead of a tuple) I get an
> explicit compiler error about that (which is kind of useful ;-)

Except that Tuples *can* can compared. Example:
----------
import std.typecons;
alias Tuple!(real,uint) Entry;
void main(){
    assert(Entry(1.0, 4) > Entry(0.5, 9));
}
-----------

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