serialisation - prevent restoring archive of class X into class Y

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

serialisation - prevent restoring archive of class X into class Y

Oliver.Kowalke-2
Hello,
is it possible to prevent that the archive of class X can be restored in
class Y (both have the same layout)?
Reagards,
Oliver

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: serialisation - prevent restoring archive of class X intoclass Y

Robert Ramey
I don't understand what this means.

Robert Ramey

[hidden email] wrote:
> Hello,
> is it possible to prevent that the archive of class X can be restored
> in class Y (both have the same layout)?
> Reagards,
> Oliver
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost 



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: serialisation - prevent restoring archive of class X intoclass Y

David Abrahams
"Robert Ramey" <[hidden email]> writes:

> I don't understand what this means.
>
> Robert Ramey

I think he wants this to be an error:

  X x;
  ar << x;
  // -- whatever you have to do to prepare the same archive for reading
  Y y;
  ar >> y;

> [hidden email] wrote:
>> Hello,
>> is it possible to prevent that the archive of class X can be restored
>> in class Y (both have the same layout)?
>> Reagards,
>> Oliver

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost