This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 09/11] Add c++14 sized deallocation operator


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]