3 ms·
C++ sort-of guarantees that your objects' destructors will be called when they go out of scope. So you can abuse this mechanic to 'register' things to be execu
by eru 2y ago
C++ sort-of guarantees that your objects' destructors will be called when they go out of scope.
So you can abuse this mechanic to 'register' things to be executed at the end of the current scope, almost no matter how you exit the current scope.