~/talk

string_view

Talkat CppCon 2015 · 2015-09-21..09-25· [software-architecture]
links:none on file
slides:none on file

string_view is a Library Fundamentals TS class that models a constant contiguous character sequence as a non-owning pointer+length (four char-type specializations), with cheap constructors from pointer+length or std::string (implicit) and one that traverses a C string to find length. It removes temporary std::string allocations so simple parsing examples go from multiple allocations and copies to no heap allocations, supports remove_prefix/remove_suffix, but gives no null termination and forces caller-managed lifetimes and thread-safety.

AI-written summary · about

  1. 0:00Introduction to string_view
  2. 1:28What is string_view
  3. 9:10How string_view works
  4. 16:19When to use string_view
  5. 23:48Performance benefits of string_view
  6. 33:38Migrating to string_view
  7. 40:59Constructing string_view
  8. 48:02String_view limitations
  9. 51:01Lifetime management concerns
  10. 55:43String_view in practice
  11. 1:01:19Where to get string_view
~/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.