absl::c_is_heap

c_is_heap overloads

Synopses

Declared in <absl/algorithm/container.h>

Container-based version of the <algorithm> std::is_heap() function to check whether the given container is a heap.

template<typename RandomAccessContainer>
constexpr
bool
c_is_heap(RandomAccessContainer const& sequence);
» more...

Overload of c_is_heap() for performing heap comparisons using a comp other than operator<

template<
    typename RandomAccessContainer,
    typename LessThan>
constexpr
bool
c_is_heap(
    RandomAccessContainer const& sequence,
    LessThan&& comp);
» more...

Return Value

  • true if sequence is a max heap, otherwise false.
  • true if sequence is a heap under comp, otherwise false.

Parameters

NameDescription
sequenceThe container to test.
compThe comparison used to order the heap.