@@ -52,8 +52,8 @@ namespace sr
52
52
}
53
53
54
54
template <class RR , class DD ,
55
- std::enable_if_t <(std::is_constructible_v<R, RR> && std::is_constructible_v<D, DD> && (std::is_nothrow_constructible_v<R, RR> || std::is_constructible_v<R, RR&>) &&(std::is_nothrow_constructible_v<D, DD> || std::is_constructible_v<D, DD&>) ), int > = 0 >
56
- unique_resource (RR&& r, DD&& d) noexcept ((std::is_nothrow_constructible_v<R, RR> || std::is_nothrow_constructible_v<R, RR&>) &&(std::is_nothrow_constructible_v<D, DD> || std::is_nothrow_constructible_v<D, DD&>) )
55
+ std::enable_if_t <(std::is_constructible_v<R, RR> && std::is_constructible_v<D, DD> && (std::is_nothrow_constructible_v<R, RR> || std::is_constructible_v<R, RR&>) && (std::is_nothrow_constructible_v<D, DD> || std::is_constructible_v<D, DD&>) ), int > = 0 >
56
+ unique_resource (RR&& r, DD&& d) noexcept ((std::is_nothrow_constructible_v<R, RR> || std::is_nothrow_constructible_v<R, RR&>) && (std::is_nothrow_constructible_v<D, DD> || std::is_nothrow_constructible_v<D, DD&>) )
57
57
: resource(detail::forward_if_nothrow_constructible<R, RR>(std::forward<RR>(r)), scope_exit{[&r, &d]
58
58
{ d (r); }}),
59
59
deleter (detail::forward_if_nothrow_constructible<D, DD>(std::forward<DD>(d)), scope_exit{[this , &d]
@@ -62,7 +62,7 @@ namespace sr
62
62
{
63
63
}
64
64
65
- unique_resource (unique_resource&& other) noexcept (std::is_nothrow_move_constructible_v<R>&& std::is_nothrow_move_constructible_v<D>)
65
+ unique_resource (unique_resource&& other) noexcept (std::is_nothrow_move_constructible_v<R> && std::is_nothrow_move_constructible_v<D>)
66
66
: resource(std::move_if_noexcept(other.resource.get())),
67
67
deleter (std::move_if_noexcept(other.deleter.get()), scope_exit{[&other]
68
68
{
@@ -144,8 +144,8 @@ namespace sr
144
144
145
145
146
146
template <class RR = R, class DD = D,
147
- std::enable_if_t <(std::is_nothrow_move_assignable_v<RR> || std::is_copy_assignable_v<RR>) &&(std::is_nothrow_move_assignable_v<DD> || std::is_copy_assignable_v<DD>), int > = 0 >
148
- unique_resource& operator =(unique_resource&& other) noexcept (std::is_nothrow_assignable_v<R&, R>&& std::is_nothrow_assignable_v<D&, D>)
147
+ std::enable_if_t <(std::is_nothrow_move_assignable_v<RR> || std::is_copy_assignable_v<RR>) && (std::is_nothrow_move_assignable_v<DD> || std::is_copy_assignable_v<DD>), int > = 0 >
148
+ unique_resource& operator =(unique_resource&& other) noexcept (std::is_nothrow_assignable_v<R&, R> && std::is_nothrow_assignable_v<D&, D>)
149
149
{
150
150
if (this != &other)
151
151
{
@@ -198,7 +198,7 @@ namespace sr
198
198
199
199
200
200
template <class R , class D , class S = std::decay_t <R>>
201
- unique_resource<std::decay_t <R>, std::decay_t <D>> make_unique_resource_checked (R&& r, const S& invalid, D&& d) noexcept (std::is_nothrow_constructible_v<std::decay_t <R>, R>&& std::is_nothrow_constructible_v<std::decay_t <D>, D>)
201
+ unique_resource<std::decay_t <R>, std::decay_t <D>> make_unique_resource_checked (R&& r, const S& invalid, D&& d) noexcept (std::is_nothrow_constructible_v<std::decay_t <R>, R> && std::is_nothrow_constructible_v<std::decay_t <D>, D>)
202
202
{
203
203
unique_resource<std::decay_t <R>, std::decay_t <D>> ur{std::forward<R>(r), std::forward<D>(d)};
204
204
0 commit comments