absl::equal

equal overloads

Synopses

Declared in <absl/algorithm/algorithm.h>

Determines whether two ranges are equal.

template<
    class InputIt1,
    class InputIt2>
[[deprecated]]
constexpr
bool
equal(
    InputIt1 first1,
    InputIt1 last1,
    InputIt2 first2);
» more...

Determines whether two bounded ranges are equal.

template<
    class InputIt1,
    class InputIt2>
[[deprecated]]
constexpr
bool
equal(
    InputIt1 first1,
    InputIt1 last1,
    InputIt2 first2,
    InputIt2 last2);
» more...

Determines whether two ranges are equal using a custom predicate.

template<
    class InputIt1,
    class InputIt2,
    class BinaryPredicate>
[[deprecated]]
constexpr
bool
equal(
    InputIt1 first1,
    InputIt1 last1,
    InputIt2 first2,
    BinaryPredicate p);
» more...

Determines whether two bounded ranges are equal using a custom predicate.

template<
    class InputIt1,
    class InputIt2,
    class BinaryPredicate>
[[deprecated]]
constexpr
bool
equal(
    InputIt1 first1,
    InputIt1 last1,
    InputIt2 first2,
    InputIt2 last2,
    BinaryPredicate p);
» more...

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

  • true if the two ranges compare element-wise equal.
  • true if the two ranges have equal length and compare element-wise equal.
  • true if every compared pair of elements satisfies p.
  • true if the two ranges have equal length and every compared pair of elements satisfies p.

Parameters

NameDescription
first1Iterator to the first element of the first range.
last1Iterator one past the last element of the first range.
first2Iterator to the first element of the second range.
last2Iterator one past the last element of the second range.
pBinary predicate used to compare corresponding elements.