~/talk

Why does std::format do that?

Talkat CppCon 2021 · on Thursday, 2021-10-28· at 15:15· A) Aurora C/D, online· [javascript]
links:none on file
slides:none on file

Explains why std::format is both fast and compact: implemented in msvc implementation based on {fmt}, it uses type erasure to pack arguments (avoiding combinatorial code bloat) and replaces an array-of-variants layout that costs three pointers per arg with a compact two-array store, adds an erased output iterator (fmt_buffer) that cuts ~30KB per iterator type, requires /utf-8 for big speedups, and ships in Visual Studio 2019/2022 with defect‑report fixes pending for C++20.

AI-written summary · about

  1. 0:00Intro
  2. 2:13Format
  3. 3:58Specifiers
  4. 5:49Performance
  5. 8:59Implementation
  6. 10:39Type erasure
  7. 11:35Same code
  8. 14:13Different methods
  9. 15:02Format functions
  10. 18:20Format arguments
  11. 24:14Format arg
  12. 25:36Output iterator type
  13. 33:42Optimizations
  14. 42:47Format Type
  15. 44:26Open Source Contributions
  16. 50:15Use utf8
  17. 52:12Why not throw an exception
  18. 55:40Signature of format
~/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.