On 6/16/07, michael.a <[EMAIL PROTECTED]> wrote:

As for "placement new", from what I can find, it is unsafe to use with any
memory that isn't part of the heap.
Huh?????  It can be used with stack variables, we have tests in the
testsuite where we use it with such.

As for the discussion of unions, placement new is way too much overhead.

placement new has no overhead, that is by design.  I literally mean
placement new does nothing except for changing the dynamic type and
calling the constructor.  Where is the overhead there?  I see unions
having more overhead than placement new as unions are not as well
optimized.

-- Pinski

Reply via email to