On 6/16/15 1:19 PM, Philipp Münzel wrote:
you should be able to simply define a private default constructor, if boost::serialization::acess is declared as a friend of your class.
In theory. Current bugs in boost::serialization however then prevent the use in a container, for example serializing a std::set<T> where T has a private default constructor.
lol - that's not a bug - that's the way it's always been. And it has nothing to do with serialization of containers per se. The whole concept of "private function" conflicts with the concept of calling functions from outside the class. So either one violates the contract implied by private and implements the constructor outside the class or one respects the C++ syntax and doesn't try to get around it. Robert Ramey