|
|
|
|
|
by peterfirefly
1149 days ago
|
|
And you can effectively do both: #ifdef NDEBUG
# define UNREACHABLE() unreachable()
#else
# define UNREACHABLE() assert(0)
#endif
That's what I have been doing for years, except with __builtin_unreachable()... and __assume(0) if I bothered to make it work under MSVC. |
|
I am pretty sure many users are going to think it is correctness check an not an optimization attribute.