Skip to content

Extrema algorithms with repeated values #6627

Open
@K-ballo

Description

@K-ballo

Extrema algorithms (min_element/max_element/minmax_element) have specific semantics in case of repeated values. The existing unit tests don't cover these, as they only use random_iota as the input range. In particular:

  • min_element is required to return the first min value,
  • max_element is required to return the first max value,
  • minmax_element is required to return the first min value and the last max value.

Tests for these cases should be added, and the implementations adjusted as needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions