浏览代码

Forwarding instead of moving is required by R8 (#121).

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

+ 1
- 1
include/detail/scope_guard_base.h 查看文件

@@ -80,7 +80,7 @@ namespace sr::detail
scope_guard_base(scope_guard_base&& other) noexcept(std::is_nothrow_move_constructible_v<EF>
|| std::is_nothrow_copy_constructible_v<EF>)
: Strategy(other),
m_exitfunction(std::move_if_noexcept(other.m_exitfunction)),
m_exitfunction(std::forward<EF>(other.m_exitfunction)),
m_execute_on_destruction(other.m_execute_on_destruction)
{
other.release();

正在加载...
取消
保存