Boost logo

Boost Users :

Subject: Re: [Boost-users] Serializing UUIDs into text archives
From: Matthias Vallentin (vallentin_at_[hidden])
Date: 2012-03-14 21:24:53

> 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);

   boost::uuids::uuid id = boost::uuids::random_generator()();
   oa << id;

   return 0;


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at