~/talk

"Mostly Invalid": flat_map, Exception Guarantees, and the STL

Talkat CppCon 2019 · 2019-09-15..09-20· [software-architecture]
slides:none on file

Shows concrete failures: a throwing comparator or hasher breaks priority_queue and unordered_set invariants and yields a mostly invalid state where find and iteration disagree; MSVC’s unordered_set is fixed in master but libc++ and libstdc++ behave differently. Analyzed flat_map/flat_set split-storage pitfalls (extract must clear moved-from containers) and committee proposals (P0429, P1843) that either require strong exception guarantee or nuke it from orbit (clear the container) to restore invariants. Presents tradeoffs, examples on Godbolt, and no easy win.

AI-written summary · about

  1. 0:00Introduction and overview
  2. 1:21Container invariants and flat_map
  3. 2:39Priority queue with throwing comparator
  4. 12:00MSVC unordered_set rehash exception
  5. 20:01flat_set and flat_map cross-component invariants
  6. 23:34flat_map extract and moved-from state
  7. 32:09Exception guarantees in the STL
  8. 50:12Path forward and strong guarantees
  9. 1:01:10Q&A and closing remarks
~/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.