We have Scoped Value Setter, why not a little class which calls a user-supplied function in its destructor?
I think what youāre after is ScopeGuard, also if you need to store them in a container check out ErasedScopeGuard
Nailed it.
In that case my new feature request is fuzzier searching in the class index⦠I searched for āscopedā!
Thanks!
If youāre on Windows/Linux there is this, not sure how well it works. The macOS commercial software is reasonably good, but itās a sodding subscription model now which I will not be bothering with once my 2 year grace period expires as the one docset I mainly use (JUCE) is not part of the official ones and the docset available from @modosc hasnāt been updated in a while (which is fair enough, I could always fix that myself).
fwiw I just tried a search for āscopedā in Dash and ScopeGuard ended up being a long way down the results list. The other annoying thing is the inherited methods/members accordions will not expand in Dash. The Dash author told me itās a problem the docset author needs to fix! ![]()
i havenāt been updating it lately because dashās subscription model is annoying enough that i donāt feel like doing free work for them anymore.
that being said, anyone can fork my repo (or take it over, iām happy to transfer) if they want to keep publishing.
the docset build just comes from juceās Doxyfile with a few QOL changes changes. if thereās an option that does what you describe lmk and iām happy to try it.
Yeah I fully understand that position. As soon as my grace period is up Iāll not subscribe. A proper cross-platform FOSS alternative would be great, Iāll add it to my list of never-to-be-completed "things I want to build"ā¢ā¦ ![]()
