Boost logo

Boost :

Subject: Re: [boost] [serialization] rvalues and const-correctness?
From: David Abrahams (dave_at_[hidden])
Date: 2008-11-06 18:49:06

on Thu Nov 06 2008, "Robert Ramey" <> wrote:

> Thorsten Ottosen wrote:
>> Robert Ramey skrev:
>>> David Abrahams wrote:
>>> 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();
>>>> }
>>> Aaaa - I would have to spend some time to look into that.
>> Isn't this the debate we have had so many times?
> well, we havn't had it lately.
> But this is actually a little different since this is calling a member
> function inside serialization. Since save(...) is a const member
> funtion, the f() would have to be const. if you can't make f() const,
> you've got something to look into.

The member function wasn't my point at all. I just want to be able to
save rvalues.

Dave Abrahams
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at