
Sergey Larin
Company: PVS-Studio
Nobody likes writing a lot of if else if
code. In many languages, pattern matching exists to solve this problem.
Unfortunately, C++ only has it for std::variant
via std::visit
.
We'll discuss how to implement your own simple pattern matching solution using the example of working with AST nodes.
Company: PVS-Studio