This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofCD1 status.
Section: 26.13[alg.c.library]Status:CD1Submitter: Ray LischnerOpened: 2003-04-08Last modified: 2016-01-28
Priority:Not Prioritized
View all otherissues in [alg.c.library].
View all issues withCD1 status.
Discussion:
Section 26.13[alg.c.library] describes bsearch and qsort, from the Cstandard library. Paragraph 4 does not list any restrictions on qsort,but it should limit the base parameter to point to POD. Presumably,qsort sorts the array by copying bytes, which requires POD.
Proposed resolution:
In 26.13[alg.c.library] paragraph 4, just after the declarations andbefore the nonnormative note, add these words: "both of which have thesame behavior as the original declaration. The behavior is undefinedunless the objects in the array pointed to bybase are of PODtype."
[Something along these lines is clearly necessary. Matt provided wording.]