[Lldb-commits] [PATCH] D43662: [Utility] Simplify and generalize the CleanUp helper, NFC
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 22 18:56:50 PST 2018
labath added a comment.
While we wait for the verdict on the template stuff, it occurred to me that you don't need the PerformCleanup bool member as std::function has an "empty" state. So the destructor can just do `if(Cleanup) Cleanup()` and the disable function can reset the cleanup object. (If you want to make sure the object is always created with a non-empty std::function initially, you can add an assert in the constructor).
More information about the lldb-commits