}
void load_override(class_id_type & t){
library_version_type lvt = this->get_library_version();
+ /*
+ * library versions:
+ * boost 1.39 -> 5
+ * boost 1.43 -> 7
+ * boost 1.47 -> 9
+ *
+ *
+ * 1) in boost 1.43 and inferior, class_id_type is always a 16bit value, with no check on the library version
+ * --> this means all archives with version v <= 7 are written with a 16bit class_id_type
+ * 2) in boost 1.44 this load_override has disappeared (and thus boost 1.44 is not backward compatible at all !!)
+ * 3) recent boosts reintroduced load_override with a test on the version :
+ * - v > 7 : this->detail_common_iarchive::load_override(t, version)
+ * - v > 6 : 16bit
+ * - other : 32bit
+ * --> which is obviously incorrect, see point 1
+ *
+ * the fix here decodes class_id_type on 16bit for all v <= 7, which seems to be the correct behaviour ...
+ */
if(boost::archive::library_version_type(7) < lvt){
this->detail_common_iarchive::load_override(t);
}
- else
- if(boost::archive::library_version_type(6) < lvt){
- int_least16_t x=0;
- * this->This() >> x;
- t = boost::archive::class_id_type(x);
- }
else{
- int x=0;
+ int_least16_t x=0;
* this->This() >> x;
t = boost::archive::class_id_type(x);
}