[#absl-c_prev_permutation-08]
= xref:absl.adoc[absl]::c&lowbar;prev&lowbar;permutation
:relfileprefix: ../
:mrdocs:

`c&lowbar;prev&lowbar;permutation` overloads

== Synopses

Declared in `&lt;absl&sol;algorithm&sol;container&period;h&gt;`

Container&hyphen;based version of the &lt;algorithm&gt; `std&colon;&colon;prev&lowbar;permutation()` function to rearrange a container&apos;s elements into the next lexicographically lesser permutation&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename C&gt;
constexpr
bool
xref:absl/c_prev_permutation-00.adoc[c&lowbar;prev&lowbar;permutation](C& c);
----

[.small]#xref:absl/c_prev_permutation-00.adoc[_» more&period;&period;&period;_]#

Overload of `c&lowbar;prev&lowbar;permutation()` for performing a lexicographical comparison using a `comp` operator instead of `operator&lt;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename C,
    typename LessThan&gt;
constexpr
bool
xref:absl/c_prev_permutation-0b.adoc[c&lowbar;prev&lowbar;permutation](
    C& c,
    LessThan&& comp);
----

[.small]#xref:absl/c_prev_permutation-0b.adoc[_» more&period;&period;&period;_]#

== Return Value

`true` if a previous permutation exists, `false` if the range was reset to the last permutation&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *c*
| The container to rearrange&period;
| *comp*
| The comparison used to order the elements&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
