@ID_AA_Carmack I like Capnproto's use of templates to catch integer overflow bugs: https://t.co/Bv7fMgnyc6
I have seen sfinae and template specialization used to make illegal state impossible to represent in a safety critical system. It became much harder to understand, though...