2 ms·
Why not just #define MY_ASSERT(expr) ((void)(false && (expr))) The problem the do-while idiom is that the macro result is not an expression, so it can’t b
by DerekL 7y ago
Why not just
#define MY_ASSERT(expr) ((void)(false && (expr)))
The problem the do-while idiom is that the macro result is not an expression, so it can’t be used in certain cases.