~/talk

“Enough string_view to Hang Ourselves”

Talkat CppCon 2018 · 2018-09-23..09-28· [web-platform]
slides:none on file

Argues that std::string_view is a useful zero-copy glue for mixed string APIs but repeatedly causes real bugs: dangling references from storing views, a surprising implicit conversion path where std::string’s new templated constructor accepts a string_view, and subtle auto traps that bind views to temporary concatenation results. Shows static checks (clang-tidy’s bugprone-dangling-handle and clang -Wlifetime) catching many cases, recommends restrict views to parameter use, document returns, and avoid storing or implicit conversions.

AI-written summary · about

  1. 0:00Start
  2. 0:26Road Map
  3. 1:09Why Are We Talking about String View
  4. 7:13Alternatives
  5. 8:05The Abseil Project
  6. 15:54Storing String Views
  7. 17:59Get Frequency from Keyword
  8. 20:21The Sink Idiom
  9. 33:11Client Power Tools
  10. 34:06Bug Prone Dangling Handle
  11. 47:18Borrow Type
  12. 49:22Problem with String View
  13. 59:18What's the Benefit of String Views
~/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.