Binary data-structure serialization

Robert M. Münch robert.muench at robertmuench.de
Thu Jun 3 00:31:34 PDT 2010


On 2010-06-02 21:34:32 +0200, Andrei Alexandrescu said:

> The signature for non-class types is:
> 
> T* emplace(T, Args...)(void * address, Args args);
> 
> The function creates an object of type T at location address and 
> initializes it with args. Returns a pointer to the just-created value. 
> I needed this function for TightArray.

Hi, does this already work? This would make it possible to allocate T 
within a memory-mapped file. I would like to give it a try.

Not sure how to deal with re-allocation problem as pointers within the 
MMF need to be MMF relative and not absolut. IMO via operator 
overloading this should be possible to handle in the background.


-- 
Robert M. Münch
www.robertmuench.de



More information about the Digitalmars-d mailing list