Kaynağa Gözat

Explicit removed from the unique_resource ctor (#140).

main
offa 6 yıl önce
ebeveyn
işleme
fcf67440ed
1 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. +5
    -5
      include/unique_resource.h

+ 5
- 5
include/unique_resource.h Dosyayı Görüntüle

@@ -51,11 +51,11 @@ namespace sr
&& (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
>
explicit 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&>))
: resource(detail::forward_if_nothrow_constructible<R, RR>(std::forward<RR>(r)), scope_exit{[&r, &d] { d(r); }}),
deleter(detail::forward_if_nothrow_constructible<D, DD>(std::forward<DD>(d)), scope_exit{[this, &d] { d(get()); }}),
execute_on_reset(true)
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&>))
: resource(detail::forward_if_nothrow_constructible<R, RR>(std::forward<RR>(r)), scope_exit{[&r, &d] { d(r); }}),
deleter(detail::forward_if_nothrow_constructible<D, DD>(std::forward<DD>(d)), scope_exit{[this, &d] { d(get()); }}),
execute_on_reset(true)
{
}


Yükleniyor…
İptal
Kaydet