Boost logo

Boost Users :

From: Tim St. Clair (timothysc_at_[hidden])
Date: 2008-06-03 11:54:07


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

On Tue, Jun 3, 2008 at 8:55 AM, Martin Trappel <0xCDCDCDCD_at_[hidden]> wrote:

> sam 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?
> >
>
> IMHO, usage of any serialization API should never, ever introduce
> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

-- 
Regards,
Timothy St. Clair
[timothysc_at_[hidden]]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net