
6 Nov
2008
6 Nov
'08
7:38 p.m.
Consider: struct X { int f(); template <class Archive> void save(Archive& ar, unsigned) { ar << f(); // can't bind non-const reference to temporary } BOOST_SERIALIZATION_SPLIT_MEMBER() }; This error seems silly to me. Couldn't we add this overload to the archives, or even simply replace the existing operator with this one? template<class T> Archive & operator<<(T const & t){ // ^^^^^------------- Note this->This()->save_override(t, 0); return * this->This(); } TIA, -- Dave Abrahams BoostPro Computing http://www.boostpro.com