offa 7 лет назад
Родитель
Сommit
8cd44f63f0
1 измененных файлов: 2 добавлений и 7 удалений
  1. +2
    -7
      include/unique_resource.h

+ 2
- 7
include/unique_resource.h Просмотреть файл

@@ -46,17 +46,12 @@ namespace sr
}


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)
template<class T, class U = std::conditional_t<std::is_nothrow_move_constructible<T>::value, T&&, const T&>>
constexpr U forward_if_nothrow_move_constructible(T&& value)
{
return std::forward<T>(value);
}

template<class T, std::enable_if_t<!std::is_nothrow_move_constructible<T>::value, int> = 0>
constexpr const T& forward_if_nothrow_move_constructible(T&& value)
{
return value;
}


template<class R, class D>

Загрузка…
Отмена
Сохранить