Vector construction functions
Mark Mitchell
mark at codesourcery.com
Mon Aug 7 00:36:33 UTC 2000
The ABI doesn't say whether or not the constructor and destructor
parameters may be NULL for many of the functions. In some cases, it
does say that the pointers may not be NULL.
I believe that a) the spec should explicitly specify this everywhere,
and b) we should allow NULL pointers whenever it makes sense. These
are convenience routines; why not make them convenient?
For example, why not allow __cxa_vec_new2 to be used with both NULL
constructors and destructors? The caller should then pass in zero for
the padding size, of course. There's no reason to try to make these
routines go fast -- they're just their for convenience, and the memory
allocation/function call indirection overhead will swamp a few
conditionals on NULL parameters.
--
Mark Mitchell mark at codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the cxx-abi-dev
mailing list