this post was submitted on 25 Nov 2023
30 points (96.9% liked)

C++

1783 readers
1 users here now

The center for all discussion and news regarding C++.

Rules

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago (1 children)
[–] lysdexic 1 points 1 year ago (1 children)

It doesn't look like it, otherwise you'd be aware that the whole point of this submission is that casting return values with std::move disables RVO.

[–] [email protected] 1 points 1 year ago (1 children)

@lysdexic You claimed otherwise:
"
These std::move invocations are harmless, as they only cast objects to their rvalue reference.
"
If you were right, we wouldn't have the motivation to look at this in EWG.

[–] lysdexic 1 points 1 year ago

If you were right, we wouldn’t have the motivation to look at this in EWG.

I am right. Not benefiting from RVO does not mean you're harming anyone.

Again, I recommend you read the submission and also the discussion.