Skip to content

Conversation

thestinger
Copy link
Contributor

The Float trait provides correct min and max methods on floating
point types, providing a consistent result regardless of the order the
parameters are passed.

These generic functions do not take the necessary performance hit to
correctly support a partial order, so the true requirement should be
given as a type bound.

Closes #12712

The `Float` trait provides correct `min` and `max` methods on floating
point types, providing a consistent result regardless of the order the
parameters are passed.

These generic functions do not take the necessary performance hit to
correctly support a partial order, so the true requirement should be
given as a type bound.

Closes #12712
bors added a commit that referenced this pull request Mar 14, 2014
The `Float` trait provides correct `min` and `max` methods on floating
point types, providing a consistent result regardless of the order the
parameters are passed.

These generic functions do not take the necessary performance hit to
correctly support a partial order, so the true requirement should be
given as a type bound.

Closes #12712
@bors bors closed this Mar 14, 2014
@bors bors merged commit 4e1c215 into rust-lang:master Mar 14, 2014
@thestinger thestinger deleted the cmp branch March 16, 2014 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

std::min and std::max should require TotalOrd
2 participants