8 Apr
2019
8 Apr
'19
11:13 p.m.
In my own code, you'll find lots of stanzas like this:
``` #ifdef NDEBUG static_assert(sizeof(X) <= cmax(sizeof(A), sizeof(B), sizeof(C), ...));
static_assert(noexcept(std::declval<A>() = std::move(std::declval<A>())); #endif ```
... and so on.
Why do you bother with the #ifdef NDEBUG ?
It signifies "this is important for the final release binary" i.e. please ask one of the tech leadership if you break this. It has no technical meaning. But it is *very* effective at worrying people. Niall