This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Updating nth_element for C++0x



On 24 Aug 2009, at 10:49, Paolo Carlini wrote:


-- Chris

coming to more substantive things, I do not understand why the two
__unguarded_partition_pivot call __unguarded_partition in two different
ways. In other terms, I would have expected only an additional __comp
argument.



Sorry, you are correct, there is a bug in the __comp one, which came from changing some code around and not being consistent. The correct form is:


return __unguarded_partition(__first + 1, __last, *__first, __comp);

Unfortunately, this bug only makes the sort perform poorly, rather than misbehave, which is why I didn't catch it.

Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]