-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature: defer #31
Feature: defer #31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for the PR. Beautifully built. thx. two minor things.
Regarding your question: I would change the names to DICE_DEFER
, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring comments ScopeGuardOnExit not the namespace at the moment. To document the namespace, it's name should be changed. Please also change the name of the namespace where it is used.
PS: The changes look good otherwise and the explanations are easy to follow. 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the review dribbling in one thing after another.
I just had another look at the branch and realized that a mentioning of the new library feature in https://github.com/dice-group/dice-template-library/tree/feature/defer?tab=readme-ov-file#dice-template-library and a short description in https://github.com/dice-group/dice-template-library/tree/feature/defer?tab=readme-ov-file#usage is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change DEFER*
-> DICE_DEFER*
is still missing
see: #31 (review)
Ups, I didn't see that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pefect. thx :)
Implements a mechanism like GO's
defer
or C23'sdefer
proposal or Andrei Alexandrescu'sSCOPE_EXIT
mechanism.Open question:
DICE_DEFER
to avoid conflicts?