Przeglądaj źródła

Refactoring, both mctor's can be merged into one.

main
offa 7 lat temu
rodzic
commit
b9cce110e6
1 zmienionych plików z 0 dodań i 16 usunięć
  1. +0
    -16
      include/unique_resource.h

+ 0
- 16
include/unique_resource.h Wyświetl plik

@@ -101,10 +101,6 @@ namespace sr
d(r);
}

template<class TR = R, class TD = D,
std::enable_if_t<(std::is_nothrow_move_constructible<TR>::value
&& std::is_nothrow_move_constructible<TD>::value), int> = 0
>
unique_resource(unique_resource&& other) noexcept(std::is_nothrow_move_constructible<R>::value
&& std::is_nothrow_move_constructible<D>::value)
: m_resource(forward_if_nothrow_move_constructible<R>(std::forward<R>(other.m_resource))),
@@ -113,18 +109,6 @@ namespace sr
{
}

template<class TR = R, class TD = D,
std::enable_if_t<(!std::is_nothrow_move_constructible<TR>::value
|| !std::is_nothrow_move_constructible<TD>::value), int> = 0
>
unique_resource(unique_resource&& other) noexcept(std::is_nothrow_move_constructible<R>::value
&& std::is_nothrow_move_constructible<D>::value)
: m_resource(other.m_resource),
m_deleter(other.m_deleter),
m_execute_on_destruction(std::exchange(other.m_execute_on_destruction, false))
{
}

unique_resource(const unique_resource&) = delete;

~unique_resource()

Ładowanie…
Anuluj
Zapisz