Главная
Study mode:
on
1
Introduction
2
Rvalue Lifetime
3
Named Return Value Optimization
4
No Named Return Value Optimization
5
A Special Case
6
Recommendations
7
Temporary Lifetime Extension
8
Generic Code
9
Lifetime Extension
10
Example
11
The problem
12
The solution
13
Declaration type
14
Autocrf
15
Autocrf const
16
Autocrf rvalue
17
Accessors
18
C
19
What C does
20
We made a mess
21
Warning
22
Requirements
23
Reference Binding
24
Trying it out
25
Impact on the standard library
26
Mitigations
27
Member Accessors
28
Conclusion
Description:
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only! Grab it Explore the intricacies of C++ rvalue lifetimes in this conference talk from C++ on Sea 2023. Delve into the challenges and potential pitfalls of rvalue references, including their impact on memory management and code safety. Learn about the unexpected behavior of rvalues binding to const& and the limitations of temporary lifetime extension. Discover a library-only approach to mitigate these issues and consider a proposal for potential language improvements. Gain insights from real-world examples of memory corruption caused by these problems and understand their implications for generic code and the C++ standard library.

The C++ Rvalue Lifetime Disaster - Understanding and Mitigating Issues

cpponsea
Add to list