|
|
|
|
|
|
|
|
explicit unique_resource_t(Ressource&& res, Deleter&& deleter, bool shouldrun = true) noexcept : m_resource(std::move(res)), |
|
|
explicit unique_resource_t(Ressource&& res, Deleter&& deleter, bool shouldrun = true) noexcept : m_resource(std::move(res)), |
|
|
m_deleter(std::move(deleter)), |
|
|
m_deleter(std::move(deleter)), |
|
|
m_execute_on_destruction(shouldrun) |
|
|
m_execute_on_destruction(shouldrun) |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
unique_resource_t(const unique_resource_t&) = delete; |
|
|
|
|
|
unique_resource_t(unique_resource_t&&) = default; |
|
|
|
|
|
|
|
|
~unique_resource_t() |
|
|
~unique_resource_t() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unique_resource_t& operator=(unique_resource_t&&) = default; |
|
|
|
|
|
unique_resource_t& operator=(const unique_resource_t&) = delete; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
private: |
|
|
|
|
|
|
|
|
Ressource m_resource; |
|
|
Ressource m_resource; |