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

throw() -> noexcept #623

Merged
merged 2 commits into from
Oct 23, 2024
Merged

throw() -> noexcept #623

merged 2 commits into from
Oct 23, 2024

Conversation

r-barnes
Copy link
Contributor

throw() was deprecated in C++11 and removed in C++17. noexcept is the appropriate fix.

@zeux
Copy link
Owner

zeux commented Jul 15, 2024

Only deprecated in 17 and removed in 20 according to https://en.cppreference.com/w/cpp/language/noexcept_spec. pugixml doesn’t require C++11 so this will need to be guarded appropriately.

@r-barnes
Copy link
Contributor Author

@zeux - ironically the same site shows C++11/C++17 here, but what you've found matches my experience: https://en.cppreference.com/w/cpp/language/except_spec

I've used the gated form.

@zeux
Copy link
Owner

zeux commented Jul 16, 2024

ironically the same site shows C++11/C++17 here

That’s referring to a non-empty throw specification which had a different deprecation schedule.

@zeux
Copy link
Owner

zeux commented Jul 16, 2024

PUGIXML_NOEXCEPT should be defined as throw() for builds to pass I believe.

This is necessary to avoid gcc warnings for exception::what()
@zeux zeux merged commit 7e70274 into zeux:master Oct 23, 2024
27 checks passed
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

Successfully merging this pull request may close these issues.

2 participants