|
Boost Users : |
Subject: Re: [Boost-users] [serialization] Serializing a reference
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-10-28 00:57:53
AMDG
Ben wrote:
> template<class Ar>
> void save_construct_data(Ar & ar, const B * b, const unsigned int ver) {
> ar << (&(b->a));
> }
>
> <snip>
> test.cc:27: error: no match for 'operator<<' in 'ar << (A*)b->B::a'
> /opt/local/include/boost/archive/detail/interface_oarchive.hpp:63:
> note: candidates are: Archive&
> boost::archive::detail::interface_oarchive<Archive>::operator<<(T&)
>
> Compilation exited abnormally with code 2 at Fri Oct 23 15:25:30
>
> What am I doing wrong?
>
You're trying to serialize an rvalue.
In Christ,
Steven Watanabe
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