[#absl-c_is_sorted-0b] = xref:absl.adoc[absl]::c_is_sorted :relfileprefix: ../ :mrdocs: `c_is_sorted` overloads == Synopses Declared in `<absl/algorithm/container.h>` Container‐based version of the <algorithm> `std::is_sorted()` function to evaluate whether the given container is sorted in ascending order. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename C> constexpr bool xref:absl/c_is_sorted-04.adoc[c_is_sorted](C const& c); ---- [.small]#xref:absl/c_is_sorted-04.adoc[_» more..._]# Overload of `c_is_sorted()` for performing a `comp` comparison other than the default `operator<`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename C, typename LessThan> constexpr bool xref:absl/c_is_sorted-0d.adoc[c_is_sorted]( C const& c, LessThan&& comp); ---- [.small]#xref:absl/c_is_sorted-0d.adoc[_» more..._]# == Return Value * `true` if `c` is sorted in ascending order, otherwise `false`. * `true` if `c` is sorted according to `comp`, otherwise `false`. == Parameters [cols="1,4"] |=== | Name| Description | *c* | The container to test. | *comp* | The comparison used to order the elements. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#