Boost logo

Boost Users :

From: Pritam Gharat (pritam01gharat_at_[hidden])
Date: 2019-10-31 09:47:00


Hi,

I am using Boost to serialize pointers of a base class which points to
instances of a derived template class. I am using boost 1.7.0 and running
it on Ubuntu 16.04.

The source code of the example is available at
https://github.com/PritamMG/Boost-Serialization-Example

My example has a base class Bar_A (definition available in
include/Abstract.hpp) which has a virtual function toStr(). It has two
derived classes Bar_B and Bar_C. Bar_B is a template class.
I have registered the derived classes in sc/Test.cpp. Class ObjectNew
(include/Object.hpp) has a member pointer of type Bar_A which points to
instances of classes Bar_B and Bar_C.

I get an error as "unregistered class". I am not sure for which class do I
get this error message.

There is also an issue of non-default. If Bar_B does not have a default
constructor, save_construct_data and load_construct_data are over-ridden
and there I run into an error "too many template-parameter-lists".

How do I define these functions?

Thanks,
Pritam



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