lysdexic@programming.devM to C++@programming.devEnglish · 1 year agoOn harmful overuse of std::move - The Old New Thingdevblogs.microsoft.comexternal-linkmessage-square22fedilinkarrow-up128arrow-down11
arrow-up127arrow-down1external-linkOn harmful overuse of std::move - The Old New Thingdevblogs.microsoft.comlysdexic@programming.devM to C++@programming.devEnglish · 1 year agomessage-square22fedilink
minus-squarelysdexic@programming.devOPMlinkfedilinkEnglisharrow-up1·1 year ago RVO I recommend you read the thread.
minus-squarelysdexic@programming.devOPMlinkfedilinkEnglisharrow-up1·1 year agoIt 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.
minus-squareDani (:cxx: modules addict)@hachyderm.iolinkfedilinkarrow-up1·1 year ago@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.
minus-squarelysdexic@programming.devOPMlinkfedilinkEnglisharrow-up1·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.
I recommend you read the thread.
@lysdexic I did.
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.@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.
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.