30 using destroyer_type = std::function<void()>;
42 template<
class destroyer_t>
52 destroyer_type m_Destroyer;
57 std::swap(m_Destroyer, other.m_Destroyer);
60 inline destruction_callback& destruction_callback::operator=(destruction_callback&& other) noexcept
62 std::swap(m_Destroyer, other.m_Destroyer);
66 inline destruction_callback::~destruction_callback()
72 template<
class destroyer_t>
73 destruction_callback::destruction_callback(destroyer_t destroyer) : m_Destroyer(std::move(destroyer))
Class for RAII: functor passed in constructor will be called in destructor.
#define QX_NONCOPYABLE(className)
Define class as non copyable.