Re: sized delete in _Temporary_buffer<>

2019-07-19 Thread François Dumont
(2nd sent attempt as text this time.) Good spot, fixed with attached patch, committed as trivial. 2019-07-19  François Dumont     * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix     sized deallocation size computation. On 7/19/19 9:46 PM, Morwenn Ed wrote: If I'm not

RE: sized delete in _Temporary_buffer<>

2019-07-19 Thread Morwenn Ed
If I'm not mistaken this patch allocates N*sizeof(_Tp) bytes of storage and deallocates N bytes when sized deallocation is enabled? Shouldn't __return_temporary_buffer deallocate N*sizeof(_Tp) instead to match the value passed to new? De : libstdc++-ow...@gcc.gn

Re: sized delete in _Temporary_buffer<>

2019-07-18 Thread Jonathan Wakely
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(