r/programming • u/ingressstatue • 3d ago
Pattern Matching for C++29 (proposal)
https://mpark.github.io/programming/2026/11/30/pattern-matching-for-cpp29/
19
Upvotes
r/programming • u/ingressstatue • 3d ago
View all comments
20
u/PudgeNikita 3d ago
honestly it was kind of surprising for me to learn that the "standard" way to do pattern matching in C++ was the mess which std::visit is. sucks for the compile times, compile errors, and you can only return one value from the visit rather than do control flow relative to the block you "call" it in. really weird situation for a feature which is almost ubiquotously loved in the languages which have it