Skip to content

Commit 8c19708

Browse files
committed
Fix issue #12, thanks @Pesa
1 parent 89b274a commit 8c19708

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

include/nonstd/scope.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -827,9 +827,12 @@ class scope_success
827827
other.release();
828828
}
829829

830-
scope_constexpr_ext ~scope_success() scope_noexcept_op(
831-
scope_noexcept_op(this->exit_function())
832-
)
830+
scope_constexpr_ext ~scope_success()
831+
#if scope_BETWEEN(scope_COMPILER_GNUC_VERSION, 1, 900) // GCC < 9, issue #12
832+
scope_noexcept_op( scope_noexcept_op(exit_function()) )
833+
#else
834+
scope_noexcept_op( scope_noexcept_op(this->exit_function()) )
835+
#endif
833836
{
834837
if ( uncaught_on_creation >= detail::uncaught_exceptions() )
835838
exit_function();

0 commit comments

Comments
 (0)