cpp/algorithm/is heap until

Examines the range and finds the largest range beginning at  which is a max heap.

@1@ Elements are compared using. @3@ Elements are compared using the given binary comparison function. @2,4@ Same as, but executed according to.

Return value
The upper bound of the largest range beginning at which is a max heap. That is, the last iterator for which range  is a max heap.

Complexity
Linear in the distance between and.