[patch] : Add more move semantics to vector and deque

chris jefferson caj@cs.york.ac.uk
Sat Sep 17 13:12:00 GMT 2005


This fairly lengthy patch adds some move semantics to deque, and a few I
missed on vector. It also adds another element of N1771, the
move_iterator, which wraps an existing iterator so it returns an rvalue
reference, although this is only used in the test-suite.

While this patch is lengthy, it's also all fairly self-explanitory,
although some of it does require being a little careful. The biggest
problem I'm having with this work is trying to preserve as far as
possible the existing semantics on inserting elements of vector and
deque into themselves. This explains why in some cases the testcases
show extra copies being made.

If at some point some "offical decision" is made on the subject, either
for libstdc++-v3 or by the standards committee on which operations
should work and which shouldn't, I'll ensure that as much as should be
defined is defined, and things which aren't defined are caught in debug
mode.

Chris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-move2
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050917/938c937f/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changelog-move2
Type: application/text
Size: 2188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050917/938c937f/attachment.bin>


More information about the Libstdc++ mailing list