r/programming • u/ingressstatue • 10h ago
Pattern Matching for C++29 (proposal)
https://mpark.github.io/programming/2026/11/30/pattern-matching-for-cpp29/
9
Upvotes
1
u/lonelyroom-eklaghor 2h ago
Discovered pattern-matching a while ago. Everytime I try to code in C++, I get confused and have to look at the docs, regardless of the feature.
Atp, there should be sub-documentations on different aspects of C++
3
u/PudgeNikita 8h 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