Is it possible to non intrusively serialize a class with private data but with public get/set methods using the Boost serialize library. If not, are there other libraries that are capable of doing this?
Thnaks
Is it possible to non intrusively serialize a class with private data but with
Share
You can deserialise/serialise to temporary variables, if you have to (the archive doesn’t magically know that the variables being serialised into are fields of the class). Adapting the serialise function from the tutorial to assume no direct access to data: