Topic: New returning 0, was 'operator new[](size_t, void*)': clarifica
Author: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
Date: 1996/08/23 Raw View
In article <4viaum$237@cnn.Princeton.EDU> tim@franck.Princeton.EDU (Tim
Hollebeek) writes:
|> Also note that returning 0 from operator new() invokes implementation
|> defined behavior [basic.stc.dynamic.allocation 4] unless I'm reading
|> it wrong.
It depends which operator new. You are not allowed to return 0 from the
non-placement operator new, but there is no restriction concerning other
operator new's. (In particular, you must be allowed to return 0 from
the nothrow operator new.)
--
James Kanze Tel.: (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils, itudes et rialisations en logiciel orienti objet --
-- A la recherche d'une activiti dans une region francophone
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]