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

Const exceptions #1368

Merged
merged 3 commits into from
May 24, 2022
Merged

Const exceptions #1368

merged 3 commits into from
May 24, 2022

Conversation

cookpa
Copy link
Member

@cookpa cookpa commented May 24, 2022

Fixing one extra "const" that was preventing the merge of #1361.

hjmjohnson and others added 3 commits May 12, 2022 13:57
Following C++ Core Guidelines, April 10, 2022, which says that it is "typically
better" to catch by const reference than to catch by non-const reference. At
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#e15-throw-by-value-catch-exceptions-from-a-hierarchy-by-reference

Discussed at C++ Core Guidelines issue isocpp/CppCoreGuidelines#518 "Catch
exceptions by const reference?", from February 3, 2016.

find . -type f | egrep '\.[it]?(cc|hh|[ch](\+\+|pp?|xx)?)$' | fgrep -v ThirdParty |     xargs sed -r -i         -e 's/catch \((const )?/catch (const /g'         -e 's/catch \(const \.\.\.\)/catch (...)/g'
STYLE: Catch exceptions by _const_ reference
@cookpa cookpa merged commit d30526f into master May 24, 2022
@cookpa
Copy link
Member Author

cookpa commented May 24, 2022

Thanks @hjmjohnson for these fixes

@cookpa cookpa deleted the constExceptions branch July 9, 2022 01:53
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