|
|
|
|
|
by quotemstr
3690 days ago
|
|
> Can assert() actually function this way? Can you use assert to tell the optimizer it can assume something is true? Trivially. #ifdef NDEBUG
# define assert_and_assume(cond) if(!(cond))
__builtin_unreachable((cond))
#else
# define assert_and_assume assert
#endif
|
|