浏览代码

Unique_resource mctor updated according to R8 (fixes #128).

main
offa 6 年前
父节点
当前提交
ad5d60c182
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      include/unique_resource.h

+ 2
- 2
include/unique_resource.h 查看文件

@@ -71,8 +71,8 @@ namespace sr

unique_resource(unique_resource&& other) noexcept(std::is_nothrow_move_constructible_v<R>
&& std::is_nothrow_move_constructible_v<D>)
: m_resource(detail::forward_if_nothrow_move_constructible(other.m_resource.get()), scope_exit{[] { }}),
m_deleter(detail::forward_if_nothrow_move_constructible(other.m_deleter.get()),
: m_resource(std::move_if_noexcept(other.m_resource.get()), scope_exit{[] { }}),
m_deleter(std::move_if_noexcept(other.m_deleter.get()),
scope_exit{[&other] {
other.get_deleter()(other.m_resource.get());
other.release(); }}),

正在加载...
取消
保存