Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Pattern Matching - Match Me If You Can

CppNow via YouTube

Overview

Explore pattern matching in C++ through this comprehensive conference talk from C++Now 2019. Dive into Michael Park's presentation on a proposal to add pattern matching as a language feature in C++. Learn why pattern matching is increasingly relevant to C++ and how it can simplify code structure. Examine numerous examples demonstrating the power of this declarative approach for structured inspection of complex data types. Gain insights into the concrete features being proposed, including primary patterns, expression patterns, structured bindings, and extractor patterns. Understand the potential impact of pattern matching on C++ development and participate in the early stages of this proposal by providing feedback. Compare C++'s approach to pattern matching with implementations in other languages like Haskell, OCaml, Rust, Scala, and Swift.

Syllabus

Introduction
Switch
Dynamic Cast
Structural Association
Least Power
Selection Power
StateVisit
Decomposition
Decomposition Example
Motivation
Pattern Matching
Summary
Example
Patterns vs Values
Statement Form
Expression Form
End of Expression
Declaration Form
Disclaimer
Primary Patterns
Expression Patterns
Parenthesized
Structured Bindings
Designated Initializers
Variants
Any
Polymorphic
Binding Pattern
Can this be an expression
Star Pattern
Extractor Pattern
Extraction Pattern
Extraction Example
structre

Taught by

CppNow

Reviews

Start your review of Pattern Matching - Match Me If You Can

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.