~/talk

“MPark.Patterns: Pattern Matching in C++”

Talkat CppCon 2017 · 2017-09-24..09-29· [compilers-and-language-design]
links:none on file
slides:none on file

Library called MPark.Patterns implements pattern matching in C++17 as a header-only API using structured bindings, apply, visit and custom traits (tuple_size/variant_size). It provides as pattern, ds destructure, arg/wildcard, alternation, when-guards and a single-use variadic placeholder to match tuplelike/variantlike/any/pointerlike types. Example: expression-tree simplifier reuses shared_ptr nodes via arg and a fizzbuzz version generates the same assembly as hand-written code, so the prototype is practical though not optimized.

AI-written summary · about

  1. 0:00Intro
  2. 3:14Standards Proposal
  3. 3:44Purpose
  4. 5:24Overview
  5. 6:04Algebraic Data Types
  6. 13:15Insight from Swift
  7. 14:56Matching Simple Types
  8. 15:39Matching Product Types
  9. 17:23Matching Sum Types
  10. 18:18Main Goals
  11. 19:56Basic Structure
  12. 21:23Re: Evaluating Expressions
  13. 23:29Optional Flag
  14. 26:43Patterns So Far
  15. 27:47Simplifying Expressions
  16. 28:44Simplifying int
  17. 35:07Putting it all together
  18. 36:21Identifiers
  19. 38:43Identifier Pattern
  20. 41:27Back to the Pattern Guard
  21. 42:32Variadic Pattern
  22. 43:26Inside of a template
  23. 44:18almost tuple_cat
  24. 58:20match_result-aware invoke
  25. 58:57Expression Pattern
~/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.