cpp/algorithm/ranges/is heap until

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

@1@ Elements are compared using the given binary comparison function and projection object.

@2@ Same as, but uses as the range, as if using  as  and  as.

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 with respect to  and.

Complexity
Linear in the distance between and.