std::vector<T> does not use the move constructor of T to change its capacity

Marc Glisse marc.glisse@inria.fr
Fri Jan 16 07:31:00 GMT 2015


On Fri, 16 Jan 2015, Jakub Galgonek wrote:

> I have made some experiments with move constructors in C++ 11 (in g++
> 4.8.3 and g++ 4.9.2) and I have observed that std::vector<T> uses the
> copy constructor (instead of the move constructor) of T to change the
> capacity of a vector instance.

Please mark the move constructor as noexcept.

-- 
Marc Glisse



More information about the Libstdc++ mailing list