c/algorithm/bsearch

@1@ Finds an element equal to element pointed to by in an array pointed to by. The array contains elements of  bytes and must be partitioned with respect to, that is, all the elements that compare less than must appear before all the elements that compare equal to, and those must appear before all the elements that compare greater than the key object. A fully sorted array satisfies these requirements. The elements are compared using function pointed to by. The behavior is undefined if the array is not already partitioned with respect to in ascending order according to the same criterion that  uses. @2@ Same as, except that the additional state argument is passed to  and that the following errors are detected at runtime and call the currently installed constraint handler function:
 * or is greater than rsize_max
 * , or  is a null pointer (unless  is zero)

@3,4@ Type-generic macros equivalent to and  respectively. Let be a unqualified object type (including ).
 * If is of type, the return type is.
 * Otherwise, if is of type, the return type is.
 * Otherwise, the behavior is undefined.

If a macro definition of each of these generic functions is suppressed to access an actual function (e.g. if, , or a function pointer is used), the actual function declaration or  becomes visible.

If the array contains several elements that would indicate as equal to the element searched for, then it is unspecified which element the function will return as the result.

Return value
@1@ Pointer to an element in the array that compares equal to, or null pointer if such element has not been found. @2@ Same as, except that the null pointer is also returned on runtime constraints violations. @3,4@ Same as and  respectively, except that cv-qualification is adjusted.