Here’s one of our winners for the charity. Thank you Scopeguard for donating <3 ( I am still working on the others!)

seen from United States
seen from United States
seen from United States
seen from United States
seen from United States

seen from United States
seen from United States

seen from Netherlands

seen from Canada
seen from United States
seen from Uzbekistan

seen from Canada

seen from T1
seen from United Kingdom
seen from United States
seen from Ireland
seen from United States

seen from Netherlands
seen from Türkiye

seen from United Kingdom
Here’s one of our winners for the charity. Thank you Scopeguard for donating <3 ( I am still working on the others!)
A simplified transctional ScopeGuard
Andrei's ScopeGuard[1] idiom has been implemented by lots of people with the std::function plus a lambda, though most of the time what they need is just a:
unique_ptr<FILE, decltype((fclose))> fguard(fp, fclose);
However, no matter how the ScopeGuard is implemented, it is a code smell to use it as an ad-hoc RAII replacement. The cleanup logic is always the same, and the same code should be refactored. The original article by Andrei already pointed out the main purpose of ScopeGuard: to ease the implementation of the transactional operations to gain the strong exception safety. A rollback logic is specific to a business logic, which are seldom `refactorable'.
So that is why I design the interface of a ScopeGuard like the following:
// creates an automatically named guard defer ( <exps | statements> ); // creates an guard with a <name> defer ( <exps | statements> ) namely ( <name> );
And, to support the cascading undo operations, multiple guards can be disabled within one statement:
defer (op1; op2) namely (undo1); /* operations may fail */ defer (op3; op4; op5) namely (undo2); /* more operations may fail */ undo1 = undo2 = false; // commit
Compared with Go's `defer' keyword, my deferxx[2] does not support `recover' since the exception in C++ is not reenterable. Compared with Boost.ScopeExit, deferxx ships with a built-in commit flag and a cleaner grammar (especially, without the ugly extra semi-colon after the curly braces). Compared with D's scope guard statement, deferxx is not exception-sensible, since the exception in C++ is not detectable (std::uncaught_exception() does not distinguish an exception propagating across a destructor from an exception thrown from the scope)[3]. However, I don't think it's a good idea to turn every failure into an exception. And, coincidentally, the success return code and errno of the C library functions are 0, so that you can just assign those values to the guards ;)
Links:
[1] Generic<Programming>: Change the Way You Write Exception-Safe Code — Forever. http://www.drdobbs.com/cpp/generic-change-the-way-you-write-excepti/184403758
[2] A Go's defer-like syntax scope guard idiom in C++11. https://github.com/lichray/deferxx
[3] GotW #47: Uncaught Exceptions. http://www.gotw.ca/gotw/047.htm