absl::c_prev_permutation

Container-based version of the <algorithm> std::prev_permutation() function to rearrange a container's elements into the next lexicographically lesser permutation.

Synopsis

Declared in <absl/algorithm/container.h>

template<typename C>
constexpr
bool
c_prev_permutation(C& c);

Return Value

true if a previous permutation exists, false if the range was reset to the last permutation.

Parameters

NameDescription
cThe container to rearrange.