Re:Std::visit is everything wrong with modern C++
by tlb on Thursday September 14, 2017 @03:46PM
(#15251859)
You can use variants just fine without a visitor. Like,
which is not much worse than the pattern matching syntax.
[ Parent
| on HN ]
Re:Std::visit is everything wrong with modern C++
by ezyang on Thursday September 14, 2017 @03:51PM
(#15251899)
You don't get exhaustiveness checking, which is the killer feature of variants.
Re:Std::visit is everything wrong with modern C++
by joe_loser on Thursday September 14, 2017 @09:54PM
(#15253992)
Yeah, plus the if branches are runtime-checks instead of the if-constexpr approach