~/talk

The Pattern Matching We Already Have

slides:none on file

Argues that C++ already has real pattern matching: concrete mechanisms are overload resolution, partial/explicit template specializations, template argument deduction and class template argument deduction (CTAD introduced in C++17). Demonstrates with concrete code: overloads resolving three different inputs to the bool overload, reference collapsing and forwarding rules that explain why T&& becomes T& for lvalues, non‑deduced contexts that break deduction, and how deduction guides map constructors to deduced class types. C++26 still omits proposed match/inspect keywords.

AI-written summary · about

  1. 0:00Pattern matching in C++
  2. 3:49Function overload resolution
  3. 19:18Template specializations
  4. 32:02Template argument deduction
  5. 48:36Class template argument deduction
  6. 56:01Conclusion and key takeaways
~/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.