Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
ezyang
· 9y ago · 0 comments
You don't get exhaustiveness checking, which is the killer feature of variants.
Comments
[–]
joe_loser
9y ago
Yeah, plus the if branches are runtime-checks instead of the if-constexpr approach
[–]
gpderetta
9y ago
There is about the same amount of runtime checks. In the auto-lambda+constexpr case the switch/if-cascade is inside visit and it is required to dispatch the correct type to the visitor.