dcleblanc / SafeInt

SafeInt is a class library for C++ that manages integer overflows.
MIT License
202 stars 37 forks source link

Fix/no except #16

Closed dcleblanc closed 4 years ago

dcleblanc commented 4 years ago

This branch makes compiling with exceptions disabled supported. It encapsulates the class which throws inside a #ifdef, and if we can't throw exceptions, it makes the exception handler failfast on Windows, and abort() on everything else. If the user would like to do something else, as always, they are free to add their own exception handler.

Note - gcc is throwing some warnings with latest gcc, and I'll fix that before merging into main. Other than that, this branch can be used in production.