|
Boost Users : |
Subject: Re: [Boost-users] [serialization] Question about pointers and casting
From: troy d. straszheim (troy_at_[hidden])
Date: 2009-10-23 23:47:22
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
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