diff --git a/algorithms.tex b/algorithms.tex index ab628e6c..d709014a 100644 --- a/algorithms.tex +++ b/algorithms.tex @@ -11,15 +11,13 @@ The following subclauses describe components for non-modifying sequence operations, modifying sequence operations, -sorting and related operations, -and algorithms from the ISO C library, +and sorting and related operations, as summarized in Table~\ref{tab:algorithms.summary}. \begin{libsumtab}{Algorithms library summary}{tab:algorithms.summary} \ref{alg.nonmodifying} & Non-modifying sequence operations & \\ \ref{alg.modifying.operations} & Mutating sequence operations & \tcode{} \\ \ref{alg.sorting} & Sorting and related operations & \\ \hline -\ref{alg.c.library} & C library algorithms & \tcode{} \\ \hline \end{libsumtab} \synopsis{Header \tcode{} synopsis} @@ -4524,70 +4522,3 @@ \tcode{(last - first)/2} swaps. \end{itemdescr} - -\rSec1[alg.c.library]{C library algorithms} - -\pnum -Table~\ref{tab:algorithms.hdr.cstdlib} describes some of the contents of the header \tcode{}. - -\begin{libsyntab3}{cstdlib}{tab:algorithms.hdr.cstdlib} -\type & \tcode{size_t} & \\ \hline -\functions & \tcode{bsearch} & \tcode{qsort} \\ -\end{libsyntab3} - -\pnum -The contents are the same as the Standard C library header -\tcode{} -with the following exceptions: - -\pnum -The function signature: - -\begin{codeblock} -bsearch(const void *, const void *, size_t, size_t, - int (*)(const void *, const void *)); -\end{codeblock} - -is replaced by the two declarations: - -\begin{codeblock} -extern "C" void* bsearch(const void* key, const void* base, - size_t nmemb, size_t size, - int (*compar)(const void*, const void*)); -extern "C++" void* bsearch(const void* key, const void* base, - size_t nmemb, size_t size, - int (*compar)(const void*, const void*)); -\end{codeblock} - -both of which have the same behavior as the original declaration. - -\pnum -The function signature: - -\begin{codeblock} -qsort(void *, size_t, size_t, - int (*)(const void *, const void *)); -\end{codeblock} - -is replaced by the two declarations: - -\begin{codeblock} -extern "C" void qsort(void* base, size_t nmemb, size_t size, - int (*compar)(const void*, const void*)); -extern "C++" void qsort(void* base, size_t nmemb, size_t size, - int (*compar)(const void*, const void*)); -\end{codeblock} - -both of which have the same behavior as the original declaration. The behavior is -undefined unless the objects in the array pointed to by \tcode{base} are of trivial type. - -\enternote -Because the function argument \tcode{compar()} may throw an exception, -\tcode{bsearch()} -and -\tcode{qsort()} -are allowed to propagate the exception~(\cxxref{res.on.exception.handling}). -\exitnote - -\xref -ISO C 7.10.5.