array new-expressions: proposal
Daveed Vandevoorde
daveed at edg.com
Fri Jan 21 21:20:04 UTC 2000
Matt Austern wrote:
[...]
> PROPOSAL A.
>
> No version of operator new[] is a special case.
[...]
> PROPOSAL B.
>
> ::operator new[](size_t, void*) is a special case. For that
> version of operator new[] only, n1 = n * sizeof(T). We do not
> store the number of elements in such an array anywhere.
There is a reason that placement new is called _placement_ new:
the intent was to allow the placement of objects and arrays at a
given address. In effect, it's a way to specify a "this" pointer
to a constructor.
So I think Proposal A is really not a good idea.
Daveed
More information about the cxx-abi-dev
mailing list