A class to execute a callback when destroyed.
OnEndScope(const std::function< void()> &f=[]() {})
OnEndScope(OnEndScope &&other)=delete
std::function< void()> callback
OnEndScope(const OnEndScope &other)=delete
OnEndScope & operator=(const OnEndScope &other)=delete