Hi Daniel,
You may have already considered this option, but what if you were to require a template argument for which the user could pass a serialization behavior class ... much like an allocator for STL containers.
I.E.
YOUR CODE:
template
struct container
{
void serialize(unsigned version) {serialize_T::do(data, version);}
virtual ~container() = default;
T data;
};
USER'S CODE:
struct my_serialize
{
static void do(SOME_TYPE data, unsigned version) {}
};
typedef container my_container;
Maybe of some help to you?
-- Matt
________________________________
This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments.