~/talk

Pattern Matching in C++14

Talkat C++Now 2017 · 2017-05-15..05-20· [c-and-cpp]
links:none on file
slides:none on file

A C++14 library implements algebraic-style pattern matching with a match(expr) API that binds variables, supports value, wildcard, alternation and prod pattern for tuples and adapted structs, and includes a pattern guard for predicates. Examples include factorial, fizzbuzz (using pair of mods), Fibonacci with bind and guards, and a working red‑black tree balance rewrite using structured-binding adapters. The library reproduces Haskell/Rust patterns in single-source C++14 and expresses a nested alternation that Rust cannot.

AI-written summary · about

  1. 0:00Start
  2. 0:40Pattern Matching on Simple Values
  3. 1:16Command Line Flags
  4. 2:21Syntax
  5. 3:15Factorial
  6. 4:03Fibonacci Example
~/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.