Browse Source

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

main
offa 6 years ago
parent
commit
e5a9b9acbf
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      include/detail/scope_guard_base.h

+ 1
- 1
include/detail/scope_guard_base.h View File

@@ -58,7 +58,7 @@ namespace sr::detail
>
explicit scope_guard_base(EFP&& exitFunction) noexcept(std::is_nothrow_constructible_v<EF, EFP>
|| std::is_nothrow_constructible_v<EF, EFP&>)
: m_exitfunction(std::move(exitFunction)),
: m_exitfunction(std::forward<EFP>(exitFunction)),
m_execute_on_destruction(true)
{
}

Loading…
Cancel
Save