On parameter sinks
summary
Claim: an rvalue-reference parameter by itself is often only a maybe-move, not a guaranteed move, and that matters for lifetimes and allocations; proven by comparing isolated signatures vs well-designed overload sets like push_back which give a guaranteed move. Advice: follow core guidelines and Google C++ style, prefer an overload set or pass-by-value when the function body is expensive, use a lone rvalue-ref only if the function reports whether it actually sank the value, or make a dedicated move-only type for costly resources.
AI-written summary · about
related talks
01h 02mBack to Basics: Forwarding References - How to Forward Parameters in Modern C++
01h 02mUniversal/Forwarding References
03mLightning Talk: Ref, C++ const ref, immutable ref?
58mGreat C++ is_trivial: trivial type traits
01h 03mBack to Basics: Declarations in C++
54mA Tour of C++ Recognised User Type Categories
01h 01mBack to Basics: Concepts in C++
01h 05mBack to Basics: Lambdas
