Skip to content

std::min and std::max should require TotalOrd #12712

Closed
@thestinger

Description

@thestinger

These do not handle partial orderings correctly. #12509 adds correct min and max methods to the Float trait to be used in place of these. These will likely end up as LLVM intrinsics at some point in the future too.

This can be fixed either by making the functions require TotalOrd, or by making them default methods on Ord and doing an override for floating point types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions