You almost certainly abuse allegations . An assertion expression should never have side effects.
When you say assert(initialize_critical_space_technology()); and then omit the whole line in the release build, you can imagine what will happen.
The only safe and reasonable way to use statements is with values:
const bool space_init = initialize_critical_space_technology(); assert(space_init);
Some people introduce the VERIFY macro to always execute code:
#define VERIFY(x) (x)
source share