
23 Oct
2009
23 Oct
'09
11:20 p.m.
Ahhh - so try ar >> static_cast<A* &>(a2p); Robert Ramey troy d. straszheim wrote:
Ben wrote:
{ std::ifstream ifs(fname); boost::archive::binary_iarchive ar(ifs); ar >> static_cast<A*>(a2p); }
You're trying to write to an rvalue. Note that
int *ip = 0; static_cast<int*>(ip) = 0; // lvalue required as // left operand of assignment
doesn't compile either...
-t