Placement syntax: Difference between revisions

Content deleted Content added
Undid revision 984801001 by 203.192.227.238 (talk): ?
Line 68:
</syntaxhighlight>
 
== Use cases ==
Placement new is used when you do not want operator new to allocate memory (you have pre-allocated it and you want to place the object there), but you do want the object to be constructed. Examples of typical situations where this may be required are:
* You want to create objects in memory shared between two different processes.