This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: operator new/delete forwarding
- From: Howard Hinnant <hhinnant at apple dot com>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 9 Nov 2006 14:48:23 -0500
- Subject: Re: operator new/delete forwarding
- References: <28E2CC50-386A-47DC-8A47-29357E013744@apple.com> <B536D77F-41D2-4596-BA03-2D17A0BF1B2F@apple.com>
On Nov 9, 2006, at 2:14 PM, Howard Hinnant wrote:
Therefore I recommend that libstdc++ change at its earliest
convenience to have delete(nothrow)[] forward to delete(nothrow)
instead of to delete.
<sigh> It never fails. Make a public post and then discover you're
wrong...
Imho http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#298
got the wrong answer (it looks consistent but actually simply
propagates a mistake from C++98). The (nothrow)[] versions must
forward to the [] versions, not the (nothrow) versions. Else delete
[] is vulnerable to not being able to handle a pointer from new
(nothrow)[] (and it must handle those pointers).
I respectfully rescind my recommendation above, and change it back to
"wait on lwg 206 before touching anything". Sorry for the noise.
-Howard