Boost logo

Boost Users :

Subject: [Boost-users] [Serialize] How to serialize a class with NO serializable data
From: Merrill Cornish (merrill.cornish_at_[hidden])
Date: 2014-12-24 16:36:34


I applied the PIMPL idiom to one of my larger classes, and it worked
great. The visible class records the API with public functions and NO
data member except the pointer to the implementation class. That
pointer should not be serialized because it is created automatically
when the visible class is instantiated.

However, if I put NO serialization code in the visible class, the
visible class won't (as I understand it) be instantiated when the
archive is loaded. (I'm still far away from the point where I can try
the archive load for myself.)

Should I define the serialize<> function for the class, but with an
empty body, since there are no data members to be saved?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net