▲ 28 ▼ On harmful overuse of std::move - The Old New Thing (devblogs.microsoft.com) submitted 2 years ago by lysdexic@programming.dev [M] to c/cpp@programming.dev 22 comments fedilink hide all child comments
[–] lysdexic@programming.dev [S] 1 point 2 years ago (1 child) RVO I recommend you read the thread. permalink fedilink source parent hideshow 2 child comments replies: [–] DanielaKEngert@hachyderm.io 1 point 2 years ago (1 child) @lysdexic I did. permalink fedilink source parent hideshow 2 child comments replies: [–] lysdexic@programming.dev [S] 1 point 2 years ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [–] DanielaKEngert@hachyderm.io 1 point 2 years ago (1 child) @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. permalink fedilink source parent hideshow 2 child comments replies: [–] lysdexic@programming.dev [S] 1 point 2 years 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. permalink fedilink source parent
[–] DanielaKEngert@hachyderm.io 1 point 2 years ago (1 child) @lysdexic I did. permalink fedilink source parent hideshow 2 child comments replies: [–] lysdexic@programming.dev [S] 1 point 2 years ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [–] DanielaKEngert@hachyderm.io 1 point 2 years ago (1 child) @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. permalink fedilink source parent hideshow 2 child comments replies: [–] lysdexic@programming.dev [S] 1 point 2 years 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. permalink fedilink source parent
[–] lysdexic@programming.dev [S] 1 point 2 years ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [–] DanielaKEngert@hachyderm.io 1 point 2 years ago (1 child) @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. permalink fedilink source parent hideshow 2 child comments replies: [–] lysdexic@programming.dev [S] 1 point 2 years 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. permalink fedilink source parent
[–] DanielaKEngert@hachyderm.io 1 point 2 years ago (1 child) @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. permalink fedilink source parent hideshow 2 child comments replies: [–] lysdexic@programming.dev [S] 1 point 2 years 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. permalink fedilink source parent
[–] lysdexic@programming.dev [S] 1 point 2 years 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. permalink fedilink source parent