Title
qsort and POD
Status
cd1
Section
[alg.c.library]
Submitter
Ray Lischner

Created on 2003-04-08.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

[ Something along these lines is clearly necessary. Matt provided wording. ]

Date: 2010-10-21.18:28:33

Proposed resolution:

In [alg.c.library] paragraph 4, just after the declarations and before the nonnormative note, add these words: "both of which have the same behavior as the original declaration. The behavior is undefined unless the objects in the array pointed to by base are of POD type."

Date: 2003-04-08.00:00:00

Section [alg.c.library] describes bsearch and qsort, from the C standard 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.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2508
2010-10-21 18:28:33adminsetmessages: + msg2507
2003-04-08 00:00:00admincreate