27 Algorithms library [algorithms]

27.12 C library algorithms [alg.c.library]

[Note 1: 
The header <cstdlib> declares the functions described in this subclause.
— end note]
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, c-compare-pred* compar); void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, compare-pred* compar); void qsort(void* base, size_t nmemb, size_t size, c-compare-pred* compar); void qsort(void* base, size_t nmemb, size_t size, compare-pred* compar);
Preconditions: For qsort, the objects in the array pointed to by base are of trivially copyable type.
Effects: These functions have the semantics specified in the C standard library.
Throws: Any exception thrown by compar ([res.on.exception.handling]).
See also: ISO/IEC 9899:2018, 7.22.5