Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should ExternC functions be nothrow? #45

Open
zopsicle opened this issue May 24, 2019 · 1 comment
Open

Should ExternC functions be nothrow? #45

zopsicle opened this issue May 24, 2019 · 1 comment

Comments

@zopsicle
Copy link

It is especially important that callbacks, such as those passed to ERR_print_errors_cb, do not throw exceptions. The compiler can enforce this if the callback has the nothrow attribute. Should we add this attribute to the library in the appropriate places?

@carblue
Copy link
Contributor

carblue commented Jul 28, 2019

Yes, absolutely. (answering without having looked into the code, just from my experience with callback functions used by C originating binaries). But enforcing nothrow abruptly may break a lot of code that doesn't throw but that isn't nothrow, thus there may be a need for a gentle migration (if there is a gentle way at all).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants