https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100387
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> --- Also, our minmax and minmax_element perform up to 2n comparisons, violating the complexity requirements: minmax: At most 3 / 2 * ranges::distance(r) comparisons and twice as many applications of the projection. minmax_element: At most max(floor((3/2)*(N−1)), 0) applications of the comparison and twice as many applications of the projection, where N = ranges::distance(first, last).