I have thought of a wrapper type would be handy, that abstracts pass by reference to const or by value, with the goal of being optimal for the target ABI.
As a career C++ programmer who knows the parts of the language that I happen to, I'm trying to understand why the "lazy" concept works--I understand that bit about the function parameter name turning a prvalue into an rvalue, but I don't see how lazy fixes the issue. And I'm wondering if this fix could be automatic in the language without breaking something else I'm not aware of. Without it, this is a quite unexpected loss of RVO (at least for me and my knowledge set).
The MSVC ABI is so sad. Empty class tag types and worthwhile value semantics are just impossible.
I have thought of a wrapper type would be handy, that abstracts pass by reference to const or by value, with the goal of being optimal for the target ABI.
As a career C++ programmer who knows the parts of the language that I happen to, I'm trying to understand why the "lazy" concept works--I understand that bit about the function parameter name turning a prvalue into an rvalue, but I don't see how lazy fixes the issue. And I'm wondering if this fix could be automatic in the language without breaking something else I'm not aware of. Without it, this is a quite unexpected loss of RVO (at least for me and my knowledge set).
46:25 Eduardo’s talk from Cppcon 2020: th-cam.com/video/e8SyxB3_mnw/w-d-xo.html