Browse Source

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

main
offa 6 years ago
parent
commit
1a2c7c1b02
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

@@ -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…
Cancel
Save