I'm building this as part of an Unreal Engine plugin. On some platforms it targets, exceptions aren't available, making it impossible to compile.
My suggestion is to add the necessary Cmake configs to be able to disable exceptions, as well as utilize #ifdef __EXCEPTIONS to replace exceptions with other types of error handling (asserts for stuff that's only likely to come out during development, and perhaps returns for some runtime stuff?).
I know it'd make the code a tiny bit uglier, but it'll make it a lot more portable too, since exceptions aren't always available.
Important Clarification:
There are essentially two options here.
Remove exceptions everywhere: This will allow people to compile this library both as a statically linked library to code that can't have exceptions on, and in environments where exceptions aren't available.
Remove exceptions that cross the shared library boundaries only: This would be perhaps simpler and a more minimal change (since the only exceptions in *.h are in ZXAlgorithms.h and any other exception that wants to cross the boundary of the shared lib can be either handled with a wrapper function or handled by a compile-time flag like I suggested). This approach would be far more limiting though, but would work for when use as a shared library is desired.
P.S
I'm willing to submit a PR should this be approved.
I'm building this as part of an Unreal Engine plugin. On some platforms it targets, exceptions aren't available, making it impossible to compile.
My suggestion is to add the necessary Cmake configs to be able to disable exceptions, as well as utilize #ifdef __EXCEPTIONS to replace exceptions with other types of error handling (asserts for stuff that's only likely to come out during development, and perhaps returns for some runtime stuff?).
I know it'd make the code a tiny bit uglier, but it'll make it a lot more portable too, since exceptions aren't always available.
Important Clarification: There are essentially two options here.
ZXAlgorithms.h
and any other exception that wants to cross the boundary of the shared lib can be either handled with a wrapper function or handled by a compile-time flag like I suggested). This approach would be far more limiting though, but would work for when use as a shared library is desired.P.S I'm willing to submit a PR should this be approved.