2 ms·
You do not need launder for this. Placement new is enough as long as you refer to the newed object via the pointer returned by new. My understanding is that la
by gpderetta 3y ago
You do not need launder for this. Placement new is enough as long as you refer to the newed object via the pointer returned by new.
My understanding is that launder exists if you need to recover the pointer to the allocated object directly from the pool pointer.
Re C, I'm far from expert, but I think that the issue exists primarily if you try to allocated within an existing named object (like in the parent examu). If you carve out your allocations from a larger chunk of anonymous memory it is supposedly conforming
[A lot of "I think", "supposedly"... All object lifetimes and pointer derivation stuff is underspecified in the standards]