Introduce Defer#operator bool()

This commit is contained in:
Alexander A. Klimov 2025-03-28 11:42:30 +01:00
parent 951af1801e
commit 713930727f

View File

@ -41,6 +41,11 @@ public:
}
}
operator bool() const noexcept
{
return (bool)m_Func;
}
inline void SetFunc(std::function<void()> func)
{
m_Func = std::move(func);