浏览代码

Noexcepts fixed.

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

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

return m_value; return m_value;
} }


void reset(T&& newValue) noexcept(noexcept(m_value = move_assign_if_noexcept(newValue)))
void reset(T&& newValue) noexcept(std::is_nothrow_assignable<T, decltype(move_assign_if_noexcept(newValue))>::value)
{ {
m_value = move_assign_if_noexcept(newValue); m_value = move_assign_if_noexcept(newValue);
} }


void reset(const T& newValue) noexcept(noexcept(m_value = newValue))
void reset(const T& newValue) noexcept(std::is_nothrow_assignable<T, const T&>::value)
{ {
m_value = newValue; m_value = newValue;
} }

正在加载...
取消
保存