diff --git a/include/tl/epilogue.h b/include/tl/epilogue.h new file mode 100644 index 0000000..592e9bb --- /dev/null +++ b/include/tl/epilogue.h @@ -0,0 +1,24 @@ +#pragma once + +#include "tl/functional.h" + +namespace tl +{ +class epilogue +{ + public: + + epilogue(function i_function) noexcept + : m_function(std::move(i_function)) + { + } + + ~epilogue() noexcept + { + m_function(); + } +private: + function m_function; +}; + +} \ No newline at end of file