~/talk

C++20 – My Favourite Code Examples

Talkat ACCU 2022 · 2022-04-06..04-09· [c-and-cpp]
slides:none on file

Walks through concrete C++20 code: replaces template overloads with concepts solve overload ambiguity using requires expressions; uses ranges and views are cheap but break const propagation to slice and transform vectors with sentinels and take/transform pipelines; shows compile-time computation with consteval, arrays and view pairs to return variable-length results; demonstrates jthread + stop_token and atomic_ref to avoid thread joins and races; notes format library and coroutines/modules are not yet portable and some GCC/MSVC diagnostics still lag.

AI-written summary · about

  1. 0:00Start
  2. 2:11Function Template
  3. 2:37Function Templates
  4. 6:20Ambiguity Error
  5. 23:31Error Message
  6. 32:29Range Base for Loop
  7. 36:41Spaceship Operators
  8. 39:36Format Library
  9. 48:19Universal References
  10. 50:12Composers
  11. 53:26Match the Sizes
  12. 1:13:32Systays
  13. 1:14:31Illegitimate Operator Abuse
  14. 1:21:38Atomic Ref
  15. 1:28:01Modules
~/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.