Browse Source

Calling the deleters re-enabled.

main
offa 7 years ago
parent
commit
4978c4b76d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      include/unique_resource.h

+ 2
- 2
include/unique_resource.h View File

@@ -148,8 +148,8 @@ namespace sr
>
explicit unique_resource(RR&& r, DD&& d) noexcept(std::is_nothrow_constructible<R, RR>::value
&& std::is_nothrow_constructible<D, DD>::value)
: m_resource(std::forward<RR>(r), make_scope_exit([] { })), // TODO: Call Deleter
m_deleter(std::forward<DD>(d), make_scope_exit([] { })), // TODO: Call Deleter
: m_resource(std::forward<RR>(r), make_scope_exit([&r, &d] { d(r); })), // TODO: Call Deleter
m_deleter(std::forward<DD>(d), make_scope_exit([this, &d] { d(get()); })), // TODO: Call Deleter
m_execute_on_destruction(true)
{
}

Loading…
Cancel
Save