3 ms·
I think the PAPCFUNC type needs to have noexcept. Wrapping a function typedef in extern "C" does not make it imply noexcept IIRC. It would also help if the AP
by cryptonector 2y ago
I think the PAPCFUNC type needs to have noexcept. Wrapping a function typedef in extern "C" does not make it imply noexcept IIRC.
It would also help if the APC docs documented that APCs must not throw.
- sour-taste 2y agoThis would actually be a nice change (but probably very breaking) for c interfaces called from a c++ context to be implicitly noexcept.
- ryao 2y agoIt is a C interface. It is implicitly noexcept. I filed bugs against both GCC and LLVM requesting warnings when someone passes a non-noexcept C++ function pointer to either a C function or to a C++ noexcept function: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118263 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118263 https://github.com/llvm/llvm-project/issues/121427 https://github.com/llvm/llvm-project/issues/121427 Perhaps the C++ standards committee should specify that doing this should cause a compiler failure, rather than a warning.
- cryptonector 2y agoThanks for checking, clarifying, and filing those bugs!