$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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