This is an experimental library that has evolved to P1371, proposed for C++23.
MPark.Patterns is an experimental pattern matching library for C++17.
It determines whether a given value matches a pattern and, if it does, binds the desired portions of the value to a handler.