absl::c_is_permutation

c_is_permutation overloads

Synopses

Declared in <absl/algorithm/container.h>

Container-based version of the <algorithm> std::is_permutation() function to test whether a container is a permutation of another.

template<
    typename C1,
    typename C2>
constexpr
bool
c_is_permutation(
    C1 const& c1,
    C2 const& c2);
» more...

Overload of c_is_permutation() for using a predicate evaluation other than == as the function's test condition.

template<
    typename C1,
    typename C2,
    typename BinaryPredicate>
constexpr
bool
c_is_permutation(
    C1 const& c1,
    C2 const& c2,
    BinaryPredicate&& pred);
» more...

Return Value

  • true if c1 is a permutation of c2, otherwise false.
  • true if c1 is a permutation of c2 under pred, otherwise false.

Parameters

NameDescription
c1The first container.
c2The second container.
predThe binary predicate used to compare elements.