Boost logo

Boost Users :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-09-02 02:39:17


Sebastien Gerega wrote:

> int main(){
>
> std::ofstream oFSBS("/home/Seb/Code/testData/results.dat");
> boost::archive::text_oarchive oA(oFSBS);
> ResData temp("TEST", 1, 1);
> temp.setSAS(5555);
> oA << temp;

You need to use

   const ResData& work_around = temp;
   oA << temp;

For 1.33, Robert decided that you can't save non-const objects like this.
Many objected, but we failed to persuade him.

- Volodya


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