Boost logo

Boost :

Subject: Re: [boost] [operators] A modern SFINAE-based version of boost::operators?
From: Daniel Frey (d.frey_at_[hidden])
Date: 2017-11-14 22:12:05


> On 14. Nov 2017, at 22:32, Edward Diener via Boost <boost_at_[hidden]> wrote:
>
> On 11/14/2017 2:35 PM, Daniel Frey via Boost wrote:
>>> My understanding may be deficient but I would never assume that adding two values would change either of the values in any way, even if one or more of those values were rvalue references. Please tell me what I am missing and I will gladly admit my C++ ignorance in this matter if that is the case.
>> If you pass in an rvalue reference, you *do* expect it to be modified and you do not expect it to be accessible afterwards.
>
> OK, Point conceded.
>
>> Given:
>> void f( std::vector<int>&& v ) { ... }
>> and calling
>> std::vector< int > v = ...;
>> f(v);
>
> I think you meant
>
> f(std::move(v));

D'oh! Of course. Thanks for reading what I meant instead of reading what I wrote :)




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk