Files
cppdraft_translate/cppdraft/alg/c/library.md
2025-10-25 03:02:53 +03:00

1.9 KiB

[alg.c.library]

26 Algorithms library [algorithms]

26.13 C library algorithms [alg.c.library]

1

#

[Note 1:

The header declares the functions described in this subclause.

— end note]

🔗

void* bsearch(const void* key, void* base, size_t nmemb, size_t size, c-compare-pred* compar); void* bsearch(const void* key, void* base, size_t nmemb, size_t size, compare-pred* compar); const void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, c-compare-pred* compar); const 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);

2

#

Preconditions: For qsort, the objects in the array pointed to by base are of trivially copyable type.

3

#

Effects: These functions have the semantics specified in the C standard library.

4

#

Throws: Any exception thrown by compar ([res.on.exception.handling]).

See also: ISO/IEC 9899:2024, 7.24.5