~/talk

Are You Structure Bindable? A Tour via Concepts, SFINAE & Herb Sutter's Pattern Matching

Talkat CppNorth 2022 · 2022-07-18..07-20· [c-and-cpp]
slides:none on file

Builds a working structure_bindable concept that detects tuplelike, pair, and array bindings and—using Herb Sutter’s p2392r1 pattern matching and a size_of-on-pack proposal—also recognizes user-defined structs by arity. Shows failed attempts (concept bodies cannot perform bindings, SFINAE-only solutions require compiler intrinsics), then prototypes a real solution on the Circle compiler with static_asserts and constrained overloads that dispatch by exact number of bound elements. Demonstrates runnable examples and explains which approaches compile portably and which need nonstandard extensions.

AI-written summary · about

  1. 0:00Introduction
  2. 2:20Structure Binding
  3. 4:25Create Your Own Type
  4. 6:15C Style Arrays
  5. 7:20Creating a Concept
  6. 17:00Intrinsic Features
  7. 19:03Pattern Matching
  8. 25:32Single Element Structure Bindable
  9. 27:49Two Element Structure Bindable
  10. 30:37Anything
  11. 32:52Structure Bindable with Two
  12. 37:42Resources
~/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.