This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: sized delete in _Temporary_buffer<>
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 18 Jul 2019 11:09:34 +0100
- Subject: Re: sized delete in _Temporary_buffer<>
- References: <b85d0bf5-7c8a-050a-1d5a-1f716edc2e1d@gmail.com>
On 18/07/19 07:41 +0200, François Dumont wrote:
As we adopted the sized deallocation in the new_allocator why not
doing the same in _Temporary_buffer<>.
* include/bits/stl_tempbuf.h
(__detail::__return_temporary_buffer): New.
(~_Temporary_buffer()): Use latter.
(_Temporary_buffer(_FIterator, size_type)): Likewise.
Tested w/o activating sized deallocation. I'll try to run tests with
this option activated.
As the manual says, it's enabled by default for C++14 and later.
Ok to commit ?
OK for trunk, thanks.