Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2005-02-03 21:16:44


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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk