#include <osvr/Util/Finally.h>
Public Member Functions | |
| FinalTask (F f) | |
| Explicit constructor from something callable. | |
| FinalTask (FinalTask &&other) | |
| Move constructor - cancels the moved-from task. | |
| FinalTask (FinalTask const &)=delete | |
| non-copyable | |
| FinalTask & | operator= (FinalTask const &)=delete |
| non-assignable | |
| ~FinalTask () | |
| Destructor - if we haven't been cancelled, do our callable thing. | |
| void | cancel () |
| Cancel causes us to not do our final task on destruction. | |
Allows you to run a callable something at the end of a scope.
The class that provides the scope-guard behavior. Often not referred to by name because auto is useful here, and often not created by a direct constructor call because of the finally() convenience functions combined with lambdas.