Browse Source

Formatting fixed.

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

+ 1
- 2
include/unique_resource.h View File

unique_resource(unique_resource&& other) noexcept(std::is_nothrow_move_constructible_v<R> unique_resource(unique_resource&& other) noexcept(std::is_nothrow_move_constructible_v<R>
&& std::is_nothrow_move_constructible_v<D>) && std::is_nothrow_move_constructible_v<D>)
: m_resource(std::move_if_noexcept(other.m_resource.get()), scope_exit{[] { }}), : m_resource(std::move_if_noexcept(other.m_resource.get()), scope_exit{[] { }}),
m_deleter(std::move_if_noexcept(other.m_deleter.get()),
scope_exit{[&other] {
m_deleter(std::move_if_noexcept(other.m_deleter.get()), scope_exit{[&other] {
other.get_deleter()(other.m_resource.get()); other.get_deleter()(other.m_resource.get());
other.release(); }}), other.release(); }}),
m_execute_on_destruction(std::exchange(other.m_execute_on_destruction, false)) m_execute_on_destruction(std::exchange(other.m_execute_on_destruction, false))

Loading…
Cancel
Save