Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-02-08 22:46:08


Untl 1.34 comes out try the following on the output stream

           std::ifstream ofs("container.mob");
boost::archive::text_oarchive ia(ofs);

 

oa << MyObject;

ofs << std::endl;

  "RIVASSEAU Jean Noel" <JN.RIVASSEAU_at_[hidden]> wrote in message news:87F60F7FA02FF749AFB02BD9FCAA6B04C87411_at_naserv31.nanterre.oberthurcs.com...
  I have been able to test with a string stream; the bug does not occur.

   

  That is, this code produces the bug:

   

              std::ifstream ifs("container.mob");

  boost::archive::text_iarchive ia(ifs);

   

  ia & MyObject;

   

  while the following does not:

   

              std::ifstream ifs("container.mob");

   

              std::ostringstream tmp;

              

  tmp << ifs.rdbuf();

   

              std::istringstream is(tmp.str());

   

  boost::archive::text_iarchive ia(is);

   

  ia & MyObject;

   

   

  a) try using a different stream buffer - strstream

   

   

  So do you have any clue, Robert ?? Clearly the problem has to do with buffering somewhere..

   

  Jean-Noël

------------------------------------------------------------------------------

  _______________________________________________
  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