many containers implement Ord incorrectly #8360

Closed
thestinger opened this Issue Aug 7, 2013 · 4 comments

Comments

Projects
None yet
4 participants
@thestinger
Contributor

thestinger commented Aug 7, 2013

They assume total ordering semantics are implemented by the underlying types.

We need to clarify the semantics that are desired from lexicographic ordering in the first place, and implement this consistently/correctly.

Test cases are needed to prevent regressions in these implementations too.

@huonw

This comment has been minimized.

Show comment Hide comment
@huonw

huonw Aug 7, 2013

Member

I assume that this would be fixed by implementing < in terms of < and <= in terms of <= etc, rather than implementing only one and using the default methods for the others.

Member

huonw commented Aug 7, 2013

I assume that this would be fixed by implementing < in terms of < and <= in terms of <= etc, rather than implementing only one and using the default methods for the others.

@bluss

This comment has been minimized.

Show comment Hide comment
@bluss

bluss Aug 8, 2013

Contributor

I'm doing some work on this. It also includes tuples.

Contributor

bluss commented Aug 8, 2013

I'm doing some work on this. It also includes tuples.

@cmr

This comment has been minimized.

Show comment Hide comment
@cmr

cmr Dec 23, 2013

Contributor

This seems to have been fixed in #8400. @blake2-ppc and @thestinger, can you confirm?

Contributor

cmr commented Dec 23, 2013

This seems to have been fixed in #8400. @blake2-ppc and @thestinger, can you confirm?

@huonw

This comment has been minimized.

Show comment Hide comment
@huonw

huonw Sep 9, 2014

Member

This is now done, thanks @bluss; and with the advent of partial_cmp and the iterator functions defined in #8400 it's now easier to be correct than incorrect, which is nice. (I also checked everything in collections.)

Member

huonw commented Sep 9, 2014

This is now done, thanks @bluss; and with the advent of partial_cmp and the iterator functions defined in #8400 it's now easier to be correct than incorrect, which is nice. (I also checked everything in collections.)

@huonw huonw closed this Sep 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment