Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-08-02 10:23:38


I can't see anything wrong with it. To see the problem I would have to have
to trace into the << operartor down to iostreams.

As an aside, is there a reason that

> HGLOBAL GlobalArchiveHdl()
> {
> CSharedFileOStream lOut;
> boost::archive::binary_oarchive oa( lOut );
> // oa & mVal; // same result as below
> oa << const_cast<const value_type&>(mVal); //BOOST_1_33_0
> return lOut.Detach();
> }

wouldn't be better replaced with:

HGLOBAL GlobalArchiveHdl() const // this function doesn't modify its class
variables
{
   CSharedFileOStream lOut;
   boost::archive::binary_oarchive oa( lOut );
   oa << mVal;
   return lOut.Detach();
}

Robert Ramey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk