Hi,

GCC & clang provide the "-fno-exception" flag to completely disable
exceptions for C++ code.

When this flag is used, ev++.h fails to compile with this error:

[build] /usr/include/ev++.h:359:25: error: exception handling disabled, use
‘-fexceptions’ to enable
[build] 359 | throw bad_loop ();

Some libraries allow exceptions to be disabled. For example, boost-outcome
& nlohmann-json check exceptions. And if "exception" is disabled, they call
std::abort() when the code throws exceptions.

#if defined(__cpp_exceptions) || defined(__EXCEPTIONS) ||
defined(_CPPUNWIND)
...
#endif


Hope ev++.h can work with exception disabled compilers.

Thanks,
Zhai Zhaoxuan
_______________________________________________
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/mailman/listinfo/libev

Reply via email to