I general... you should be fine across compilers.
I have noticed oddities on 1.35.0 which have show differences across compilers, but I have had no problems in 1.34.1
My guess is that these items will be fixed in a 1.35.X release.
Cheers,
Tim
IMHO, usage of any serialization API should never, ever introducesam p wrote:
> 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?
>
problems across different compilers. That's the whole point of
serialization, I'd say :-)
Having used boost::serialization once, I would say your code will work
without problems across different compilers if it works on one of them.
(The serialization API knows nothing of the Implementation details of
the STL collections, it does its work just with the std interfaces.)
br,
Martin
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users