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: [libstdc++] pdqsort - a faster std::sort


Thanks for chiming in, Chris, I was hoping you'd be able to look into
this proposal.

On 08/04/15 10:35 +0100, Christopher Jefferson wrote:
* I assume the sort works on move-only types in C++11? (I can see you
make use of move, but do you require it?).
 - There was a reason (and I can't remember what it was now!) that we
used 'iter_swap' rather than 'swap(*a,*b)' on iterators. I think it
might be required to allow sorting std::vector<bool>? Either way, it
might be worth trying it.

Using iter_swap() does the "std swap two step" [1] for you, could that
be one reason?

[1] http://ericniebler.com/2014/10/21/customization-point-design-in-c11-and-beyond/


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