瀏覽代碼

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();

Loading…
取消
儲存