C++ Logo


Advanced search

Re: [std-proposals] pass() replacement for: forward<>()

From: Phil Bouchard <boost_at_[hidden]>
Date: Sat, 7 Jan 2023 14:44:11 -0500
On 1/7/23 03:35, Peter Olsson via Std-Proposals wrote:
>> a.foo(move(list<int>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}));
>> foo(move(ostream()));
> Do you realize that using std::move on a temporary like this is pretty
> pointless because it's already an rvalue?

I was referring to the automatic generated code by the source-to-source
compiler. Whether it's a r-value and l-value, a move() will be generated.

Logo <https://www.fornux.com/>  
*Phil Bouchard*  facebook icon
T: (819) 328-4743
E: phil_at_[hidden]| www.fornux.com <http://www.fornux.com>
8 rue de la Baie| Gatineau (Qc), J8T 3H3 Canada
Banner <https://goglobalawards.org/> Le message ci-dessus, ainsi que les
documents l'accompagnant, sont destinés uniquement aux personnes
identifiées et peuvent contenir des informations privilégiées,
confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce
message par erreur, veuillez le détruire.
This communication (and/or the attachments) is intended for named
recipients only and may contain privileged or confidential information
which is not to be disclosed. If you received this communication by
mistake please destroy all copies.

Received on 2023-01-07 19:44:12