Is it right to use serialization library in the following environment,
**********************
Main1.cpp : Compiled with Gcc stores map in /tmp/z
**********************
(1) main1.cpp
--------------------
#include <map>
#include<string>
#include <boost/archive/text_oarchive.hpp>
#include <boost/serialization/map.hpp>
#include <boost/serialization/string.hpp>
int main()
{
std::ofstream f("/tmp/z");
boost::archive::text_oarchive oar(f);
std::map<std::string, std::string> a;
..... //Some data added to this map
oar & a;
return 0;
}
**************************
main2.cpp : Compiled with Forte compiler (or say older version of GCC) loads map stored in /tmp/z
*******************************
(2) main2.cpp
-----------------------------------------------
#include <map>
#include<string>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/map.hpp>
int main()
{
std::ifstream f("/tmp/z");
boost::archive::text_iarchive iar(f);
std::map<std::string, std::string> a;
iar & a;
return 0;
}
***********************************
Can such use create problems especially with STL and their vendor specific implementations?
Thanks,
Sameer