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

Fixed scope exit class. #128

Merged
merged 1 commit into from
Dec 1, 2024
Merged

Fixed scope exit class. #128

merged 1 commit into from
Dec 1, 2024

Conversation

5cript
Copy link
Member

@5cript 5cript commented Nov 30, 2024

Addressed the following:

  • Move assignment posed the question whether a valid onExit should be called or not. This just erases it, because there is no simple definitive answer.
  • ScopeExit is no longer a template, the deduction guide was incorrect to get proper forwarding. The template parameter only for the constructor was unnecessary anyways. Moving it to the constructor only.
  • Make it explicit that the class expects a noexcept function. It was that way before by the nature of destructors being noexcept, but it is now more explicit about it.

Found by @DNKpp

@5cript 5cript force-pushed the fix/scope_exit branch 3 times, most recently from e3b4f34 to 575bde1 Compare December 1, 2024 00:13
@5cript 5cript merged commit 132fbb8 into main Dec 1, 2024
4 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.

1 participant