Allocator returning null during array construction (?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Allocator returning null during array construction (?)



The C++ Standard [clause 5.3.4, paragraph 13] says:
"...If the allocation function is declared with an empty
exception-specification, throw(), it returns null to indicate failure to
allocate storage and a nonnull pointer otherwise. ] If the allocation
function returns null, initialization shall not be done, the deallocation
function shall not be called, and the value of the newexpression shall be
null. "

The C++ ABI [clause 3.3.3], however, does not specify behaviour of array
construction functions __cxa_vec_new2 and __cxa_vec_new3 for the case when
allocator returns null.

Would you clarify this behaviour, please.


--------------------------------
 Grigory Zagorodnev
 Principal Software Engineer
 Software Technology Laboratory
--------------------------------

<<application/ms-tnef>>