Kaynağa Gözat

Helper function implemented.

main
offa 7 yıl önce
ebeveyn
işleme
831c97cc89
1 değiştirilmiş dosya ile 12 ekleme ve 0 silme
  1. +12
    -0
      include/unique_resource.h

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

@@ -35,6 +35,18 @@ namespace sr
constexpr auto is_nothrow_move_or_copy_constructible_from_v = is_ntmocp_constructible<T, TT>::value;


template<class T,
class U = std::conditional_t<(!std::is_nothrow_move_assignable<T>::value
&& std::is_copy_assignable<T>::value),
T const &,
T &&>>
constexpr U move_assign_if_noexcept(T&& value) noexcept
{
return std::move(value);
}



template<class R, class D>
class unique_resource
{

Yükleniyor…
İptal
Kaydet