~/talk

Woes of Scope Guards and Unique_Resource - 5+ years in the making

Talkat CppCon 2018 · 2018-09-23..09-28· [c-and-cpp]
slides:none on file

A generic RAII wrapper (unique_resource) evolves through ~13 papers and nine major revisions, adding CTAD, if constexpr paths and scope guards (scope_exit/scope_fail/scope_success). Stress tests that force throwing/copying deleters and move operations expose a double delete bug after 10+ iterations; fixes introduce careful conditional copy/move semantics to avoid double release and leaking. Committee feedback flags surprising cases like dangling references from lambdas capturing returned/moved-from locals; implementation and optimization (EBO / no_unique_address) remain library-impl responsibilities and standardization is still pending.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:02History of resource management
  3. 8:16RAII and C++ features
  4. 13:25Standard thread RAII issues
  5. 15:57Tracer classes and debugging
  6. 17:25Java C# influence on C++
  7. 18:28Unique pointer limitations
  8. 23:54Unique resource proposal
  9. 27:33Scope guards and Andrei Alexandrescu
  10. 36:11Generic RAII wrapper complexity
  11. 42:52Move constructor specification
  12. 49:36Feedback and standardization challenges
  13. 51:01Should you write RAII wrappers
  14. 52:46Key takeaways on RAII
  15. 55:20Tool Time and closing remarks
  16. 56:02Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.