Boost logo

Boost Users :

Subject: Re: [Boost-users] Serializing UUIDs into text archives
From: Robert Ramey (ramey_at_[hidden])
Date: 2012-03-15 03:04:47


Matthias Vallentin wrote:
>> This looks to me to some issue with boost::io_streams. Try your
>> example with a regular stream (e.g. std::fostream).
>
> Same error with a regular stream, here's the current example:
>
> #include <fstream>
> #include <boost/archive/text_oarchive.hpp>
> #include <boost/uuid/uuid_generators.hpp>
> #include <boost/uuid/uuid_serialize.hpp>
>
> int main()
> {
> std::vector<char> v;
> std::ofstream f("/tmp/foo");
> boost::archive::text_oarchive oa(f);
>
> const boost::uuids::uuid id = boost::uuids::random_generator()(); // try
> const
> oa << id;
>
> return 0;
> }
>
> Matthias
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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