This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: std::vector<T> does not use the move constructor of T to change its capacity
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Jakub Galgonek <jakub dot galgonek at gmail dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Fri, 16 Jan 2015 08:31:18 +0100 (CET)
- Subject: Re: std::vector<T> does not use the move constructor of T to change its capacity
- Authentication-results: sourceware.org; auth=none
- References: <CAGSyeuPyEGhqEPy=zWV=DY1brBkvNZBQ231FV1OYQmf-c_rnUA at mail dot gmail dot com>
- Reply-to: libstdc++ at gcc dot gnu dot org
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