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

Make almost all constructors noexcept #1436

Open
kammce opened this issue Jan 24, 2021 · 0 comments
Open

Make almost all constructors noexcept #1436

kammce opened this issue Jan 24, 2021 · 0 comments
Labels
Refactor Call to refactor code base

Comments

@kammce
Copy link
Member

kammce commented Jan 24, 2021

Most constructors will never throw an exception as they typically just set internal data members. They should be marked noexcept. The two main reasons for this are:

  • Allows potential additional optimizations of the code
  • More explicit decorators/declarations for library functions
  • (most importantly) Removes the exceptional path from the constructor as a part of code coverage
@kammce kammce added the Refactor Call to refactor code base label Jan 24, 2021
@kammce kammce self-assigned this Jan 24, 2021
@kammce kammce removed their assignment Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Call to refactor code base
Projects
None yet
Development

No branches or pull requests

1 participant