
6 Dec
2009
6 Dec
'09
10:56 a.m.
David Abrahams wrote:
On Dec 5, 2009, at 10:14 PM, Phil Endecott wrote:
while the custom allocators let you put std::containers in shared memory they are still not very useful since they can only be used by the process that put them there - other processes will (potentially) see the shared memory at a different address and all the pointers will be wrong
Isn't this *exactly* what the allocator's nested ::pointer type is for?
It would be, except that it's broken. Maybe someone else can recall the details, but it's something like allocators are required to define pointer as T* or containers are allowed to assume that they have done so. Phil.