Forwarding Values... and Backwarding Them Too?
summary
Claims a concrete fix for the “backwarding” problem: preserve lvalue, xvalue and prvalue results from a deep caller back to the call site by using decltype(auto) as the return type and casting the captured result with decltype(e)(e). Compares to std::forward and forwarding references, shows a visitor/ResourceManager example that avoids needless copies across the three value categories, and notes it works in practice except for GCC quirks with decltype(auto) deduction.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 0:15Forwarding Values
- 0:49Backwarding Values
- 2:31DeckleType
- 3:51DekelType
- 4:12Conclusion
related talks
48mBack to Basics: Cpp Value Semantics
08mReturn Values Take A Closure Walk
01h 02mEmbracing Trailing Return Types and `auto` Return SAFELY in Modern C++
01h 04mBack to Basics: Move Semantics
01h 06mThe Hidden Secrets of Move Semantics
56mC++ Relocation - How to Achieve Blazing Fast Save and Restore and More!
01h 00mThe Implementation of Value Types
54mModern Template Techniques
