This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH 09/11] Add c++14 sized deallocation operator
- From: Peter Foley <pefoley2 at pefoley dot com>
- To: cygwin-patches at cygwin dot com
- Date: Mon, 21 Mar 2016 12:35:25 -0400
- Subject: Re: [PATCH 09/11] Add c++14 sized deallocation operator
- Authentication-results: sourceware.org; auth=none
- References: <1458409557-13156-1-git-send-email-pefoley2 at pefoley dot com> <1458409557-13156-9-git-send-email-pefoley2 at pefoley dot com> <20160320112837 dot GO25241 at calimero dot vinschen dot de>
On Sun, Mar 20, 2016 at 7:28 AM, Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> This looks incomplete to me. Don't we have to export the symbol?
I don't believe so.
As I understand it, if you're overriding the standard c++ delete
implementation, starting with c++14, you also need to provide an
implementation of the sized deallocation operator, which is designed
to increase performance of deallocation if the size of the object to
be deallocated is known.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3663.html
However, the sized deallocation operator can simply be defined as an
call to the original delete operator, which simply preserves the
current behavior.
Adding this definition fixes a whole host of errors like the below:
/home/peter/cross/src/cygwin/winsup/cygwin/fhandler_disk_file.cc:2373:
undefined reference to `operator delete(void*, unsigned long)'
Hope that makes more sense.
Thanks,
Peter