]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/archive/basic_binary_iarchive.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / archive / basic_binary_iarchive.hpp
index c0cc655c99772d56c5899fbbcc1a6505cbfa52c5..c85ead86c62d7401f488bfea2c637e47370f2c7a 100644 (file)
@@ -102,17 +102,29 @@ protected:
     }
     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);
         }