Deserializing const fields

Jacob Carlborg doob at me.com
Wed Sep 5 04:06:09 PDT 2012


On 2012-09-05 09:18, Andrei Alexandrescu wrote:

> Deserialization is a low-level operation, and it shouldn't invoke a
> constructor because the object has been constructed at serialization time.
>
> I suggest you allocate a chunk of raw memory, deserialize into it, then
> cast it to the object type.

Hmm, I'll give that a try.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list