extra parameters to operator delete ?
Alexandre Oliva
oliva@dcc.unicamp.br
Sun Aug 23 20:47:00 GMT 1998
David C Binderman <dcb@pncl.co.uk> writes:
> void operator delete( void * , double) { };
> I believe it is an error to have double in the parameter list.
I don't think so, check [basic.stc.dynamic.deallocation]/2.
Furthermore, given:
struct foo { foo() { throw false; } };
void* operator new(size_t, double);
It is operator delete(void*, double) that will be called to release
the memory allocated with `new(1.0) foo' before the `false' exception
propagates out of the new-expression [except.ctor]/2.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list