
Chris Jefferson writes:
I am currently in the process of implementing all applicable (sort, rotate, partition, etc..) functions in the C++ standard library using only calls to iter_swap. Obviously for those classes with expensive copies and cheap swaps (list, vector, map, set, etc) this is a big win, however it unfortunatly can be slightly slower for classes and types which fall on the basic definition of swap. Therefore there will be an implementation-specific type trait defined (name to be decided) which can be defined to enable the swapping versions of functions.
I'm implementing much of this for my own personal usage, but I hope to submit the code to libstdc++-v3 (g++'s implementation of the c++ standard library).
May be also STLPort?
While this may not be quite as general as the ideas of "move symantics", it has the advantage of being implementable now, and providing some significant improvements.
Not to undermine your effort, but "move semantics" is implementable now as well. -- Aleksey Gurtovoy MetaCommunications Engineering