Skip to content

Commit

Permalink
Fix issue #12, thanks @Pesa
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmoene committed Feb 6, 2024
1 parent 89b274a commit 8c19708
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions include/nonstd/scope.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -827,9 +827,12 @@ class scope_success
other.release();
}

scope_constexpr_ext ~scope_success() scope_noexcept_op(
scope_noexcept_op(this->exit_function())
)
scope_constexpr_ext ~scope_success()
#if scope_BETWEEN(scope_COMPILER_GNUC_VERSION, 1, 900) // GCC < 9, issue #12
scope_noexcept_op( scope_noexcept_op(exit_function()) )
#else
scope_noexcept_op( scope_noexcept_op(this->exit_function()) )
#endif
{
if ( uncaught_on_creation >= detail::uncaught_exceptions() )
exit_function();
Expand Down

0 comments on commit 8c19708

Please sign in to comment.