Added epilogue #4
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "tl/functional.h"
|
||||
|
||||
namespace tl
|
||||
{
|
||||
class epilogue
|
||||
{
|
||||
public:
|
||||
|
||||
epilogue(function<void()> i_function) noexcept
|
||||
: m_function(std::move(i_function))
|
||||
{
|
||||
}
|
||||
|
||||
~epilogue() noexcept
|
||||
{
|
||||
m_function();
|
||||
}
|
||||
private:
|
||||
function<void()> m_function;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user