Topic: ISO-C++: new
Author: schuenem@informatik.tu-muenchen.de (Ulf Schuenemann)
Date: 1995/05/26 Raw View
I've two notes to the description of <new>:
----------------------------------------------------------
18.4.1.1[lib.new.delete.single]
in void* operator new (size_t) throw(bad_alloc);
and void* operator new (size_t, nothrow&) throw();
> ..
> Default behavior:
> ..
> - ... Otherwise, if the last argument to set_new_handler()
> was a null pointer (*), ...
Either there an addition missing:
(*) or if set_new_handler() has never been called.
or it would be shorter to say:
..., if the current new_handler is a null pointer, ...
(and more consistant to the other uses of 'the current new_handler'
like in the following sentence: -Otherwise, the function calls the
current new_handler ..).
----------------------------------------------------------
> - The loop terminates ... or when a called new_handler function
> does not return.
Shouldn't this be clarified anlogously to operator new(size_t, nothrow&) throw():
If the called new_handler function terminates by throwing a
bad_alloc exception, this execption is promoted to the caller of
operator new.
[Funny: When a called function does _not_ return, then it's
callee terminates. :-) ]
Ulf Schuenemann
--------------------------------------------------------------------
Ulf Sch nemann
Fakult t f r Informatik, Technische Universit t M nchen, Germany.
email: schuenem@informatik.tu-muenchen.de