On May 1, 8:02 am, xu****wei <xu****we...@[EMAIL PROTECTED]
> wrote:
> I don't agree that my proposal [to disallow overriding
> default operator new/delete] breaks existing code. The
>compilers of C ++0x have a lot of ways to solve this.
> For example, the compilers can
> skip overriding operator new/delete and use the default
> implementation. And they can give a warning that reminds programmers
> to eliminate useless codes. Why do I think to cancel overriding the
> DEFAULT operator new/delete is possible? Because overriding the
> DEFAULT operator new/delete only change the implementation, not the
> semantic (the concept). If implementations changes the semantic of
> DEFAULT operator new/delete, they are bad code indeed.
Why do you think existing code bothers to override the default
operator new/delete? It's typically not just for the sake of it.
Clearly it achieves some purpose: particular performance
characteristics, instrumentation, validations, sup****ts some
functionality like persistence, who knows? You don't. I'm confident
that the C++ standards committee wouldn't simply presume that it's not
im****tant to the application - in the face of the fact that the
programmer thought is was im****tant enough to code in the first place
- and can be arbitrarily discarded, regardless of how you implore them.
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|