std.serialization: pre-voting review / discussion
Jacob Carlborg
doob at me.com
Thu Aug 22 12:53:53 PDT 2013
On 2013-08-22 21:30, ilya-stromberg wrote:
> Great! What about more difficult cases? For example, we have:
>
> class Foo
> {
> int a;
> int b;
> }
>
> After changes we have new class:
>
> class Foo
> {
> long b;
> }
>
> Can std.serialization load data to new class from old file? It should
> ignore "a" and convert "b" from int to long.
No it can't. It will throw an exception because it cannot find a "long"
element:
Could not find an element "long" with the attribute "key" with the value "b"
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list