c_next_permutation overloads
Declared in <absl/algorithm/container.h>
Container-based version of the <algorithm> std::next_permutation() function to rearrange a container's elements into the next lexicographically greater permutation.
template<typename C>
constexpr
bool
c_next_permutation(C& c);
» more...
Overload of c_next_permutation() for performing a lexicographical comparison using a comp operator instead of operator<.
template<
typename C,
typename LessThan>
constexpr
bool
c_next_permutation(
C& c,
LessThan&& comp);
» more...
true if a next permutation exists, false if the range was reset to the first permutation.
| Name | Description |
|---|---|
| c | The container to rearrange. |
| comp | The comparison used to order the elements. |