USCiLab/cereal

Non-public serialization in External function

tanfetch opened this issue · 1 comments

Hi, How do I use non-public serialization in external functions?

If your question is how do you serialize non-public members in an external function, you can only serialize data you have access to. If the type does not provide access to its internals you will not be able to serialize it without working around the access modifiers, an approach that you should avoid if at all possible, though we actually do this in cereal for std::queue, see https://github.com/USCiLab/cereal/blob/master/include/cereal/types/queue.hpp.