Does the C++ standard allow for an uninitialized bool to crash a program?

Yes, ISO C++ allows (but doesn’t require) implementations to make this choice. But also note that ISO C++ allows a compiler to emit code that crashes on purpose (e.g. with an illegal instruction) if the program encounters UB, e.g. as a way to help you find errors. (Or because it’s a DeathStation 9000. Being strictly … Read more