Browse Source

Returntype corrected.

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

+ 2
- 2
include/unique_resource.h View File

} }


template<class T, std::enable_if_t<!std::is_nothrow_move_constructible<T>::value, int> = 0> template<class T, std::enable_if_t<!std::is_nothrow_move_constructible<T>::value, int> = 0>
constexpr T forward_if_nothrow_move_constructible(T&& value)
constexpr const T& forward_if_nothrow_move_constructible(T&& value)
{ {
return value; return value;
} }
std::enable_if_t<is_nothrow_move_or_copy_constructible_from_v<R, RR>, int> = 0, std::enable_if_t<is_nothrow_move_or_copy_constructible_from_v<R, RR>, int> = 0,
std::enable_if_t<is_nothrow_move_or_copy_constructible_from_v<D, DD>, int> = 0 std::enable_if_t<is_nothrow_move_or_copy_constructible_from_v<D, DD>, int> = 0
> >
explicit unique_resource(RR&& r, DD&& d) noexcept(std::is_nothrow_constructible<R, RR>::value
explicit unique_resource(RR&& r, DD&& d) noexcept(std::is_nothrow_constructible<R,RR>::value
&& std::is_nothrow_constructible<D, DD>::value) && std::is_nothrow_constructible<D, DD>::value)
: m_resource(std::move(r)), : m_resource(std::move(r)),
m_deleter(std::move(d)), m_deleter(std::move(d)),

Loading…
Cancel
Save