Yesterday night I saw another weird thing:
1. In constructor of my archive class SafeBinOutArchive, which is derived from boost::archive::binary_oarchive_impl, I register the derived class to be serialized by calling method:
template <class Archive>
void RegisterDerivedClasses(Archive& ar) {
ar.register_type((Borg::PrefsMachineHash*)0);
}
SafeBinOutArchive::SafeBinOutArchive(std::ostream & os)
: base(os, boost::archive::no_header) {
RegisterDerivedClasses(*this);
}
2. IT DOESN'T HELP, so following piece of code triggers the mentioned assert:
3. BUT IF I UNCOMMENT the commented line in the above code, IT WORKS!
How is this possible?!?!?
:-\