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]

Updating nth_element for C++0x


Hello,

I'm found myself able to spend time on libstdc++ again, and so am intending on working on finishing <algorithm> for C++0x, in particular sort and associated algorithms.

This first patch touches various pieces of code, but it's main benefit is it makes nth_element work with move-only types. I have a couple more patches in the pipeline, but am trying to put things into smaller pieces. I haven't submitted any patches for a while, I hope I've got the various formatting bits right.

Thanks, Chris

2009-08-23  Chris Jefferson <chris@bubblescope.net>
	include/stl_algo.h (__move_median_to_front): Add new method
	to ease sorting move-only types.
	(__unguarded_linear_insert) : Assume always inserting value
	at __last.
	(__insertion_sort, __unguarded_insertion_sort) : Update for
	 move-only types.
	(__unguarded_partition) : Take pivot by reference.
	(__unguarded_partition_pivot) : Add new method for sorting
	move-only types.
	(__introsort_loop, __introselect) : Use
	__unguarded_partition_pivot.
	testsuite/25_algorithms/nth_element/moveable.cc : Enable.



Attachment: nth_element_patch
Description: Binary data


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