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: Jakub Galgonek <jakub dot galgonek at gmail dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Fri, 16 Jan 2015 08:43:31 +0100
- 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> <alpine dot DEB dot 2 dot 11 dot 1501160830320 dot 1655 at laptop-mg dot saclay dot inria dot fr>
Thank you!
Jakub
2015-01-16 8:31 GMT+01:00 Marc Glisse <marc.glisse@inria.fr>:
> 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