Remove inactive guards from the standard implementation of scope_guard
@JeffGarland is already working on this.
Since Aug 17, 2025.
Assessment
This issue has not been assessed yet.
Description
After reading up on various implementations and studying design options I think that inactive guards should be removed from the design. This issue is to implement that change.
Inactive guards can occur as a resuilt of move construction or a call to release. The implications of these decisions are that the guard must store a boolean flag for the activation state and a check on destruction before calling the ExitFunction. The existence of these facilities also makes reasoning about code using scope more difficult since code readers must now process the entire scope to see of the guard has been released. Not that release is omitted by other implementations, notably GSL.
- Dominant language
- C++
- Stars
- 12
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bemanproject/scope
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
bemanproject/scope#38 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
bemanproject/scope#55 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
bemanproject/scope#50 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
bemanproject/scope#37 ·
-
Build errors on OSX Open
bemanproject/scope#36 · 4 comments · 1 assignee ·
All issues in bemanproject/scope
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100