Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

many containers implement Ord incorrectly #8360

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

many containers implement Ord incorrectly #8360

thestinger opened this issue Aug 7, 2013 · 4 comments
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@thestinger
Copy link
Contributor

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
Copy link
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
Copy link
Member

bluss commented Aug 8, 2013

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

@emberian
Copy link
Member

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

@huonw
Copy link
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 as completed Sep 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

No branches or pull requests

4 participants