This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: operator new/delete forwarding


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


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