Salome HOME
Bug: boost::archive::text_iarchive fails if archive created by newer version
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.cxx
index 363e8d7aa78c5e390fc971d3dcd83c7ebd3b3eb3..677e7fb99cb5f9eb720c97fa0d99eb5c4ef24c2c 100644 (file)
 #include "SMESH_PreMeshInfo.hxx"
 #include "SMESH_PythonDump.hxx"
 #include "SMESH_ControlsDef.hxx"
+#include <SMESH_BoostTxtArchive.hxx>
 
 // to pass CORBA exception through SMESH_TRY
 #define SMY_OWN_CATCH catch( SALOME::SALOME_Exception& se ) { throw se; }
@@ -5995,13 +5996,8 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
         aDataset->ReadFromDisk((char*) dataString.data() );
         aDataset->CloseOnDisk();
 
-        std::istringstream istream( dataString.data() );
-        boost::archive::text_iarchive archive( istream );
         std::list< std::list< std::string > > orderEntryLists;
-        try {
-          archive >> orderEntryLists;
-        }
-        catch (...) {}
+        SMESHUtils::BoostTxtArchive( dataString ) >> orderEntryLists;
 
         TListOfListOfInt anOrderIds;
         for ( const std::list< std::string >& entryList : orderEntryLists )