Hacker News new | past | comments | ask | show | jobs | submit login

__builtin_unreachable() is your friend.

Better yet, omit that default case, so that in the future when you do add a new value to the enum, the compiler will warn you and force you to add a new case.

But I agree with your general thesis that it's just not worth getting to 100% coverage.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: