| struct scope_exit_strategy | struct scope_exit_strategy | ||||
| { | { | ||||
| constexpr bool should_execute() const | |||||
| bool should_execute() const noexcept | |||||
| { | { | ||||
| return true; | return true; | ||||
| } | } |
| struct scope_fail_strategy | struct scope_fail_strategy | ||||
| { | { | ||||
| bool should_execute() const | |||||
| bool should_execute() const noexcept | |||||
| { | { | ||||
| return uncaught_exceptions() > m_uncaught_on_creation; | return uncaught_exceptions() > m_uncaught_on_creation; | ||||
| } | } |
| struct scope_success_strategy | struct scope_success_strategy | ||||
| { | { | ||||
| bool should_execute() const | |||||
| bool should_execute() const noexcept | |||||
| { | { | ||||
| return uncaught_exceptions() <= m_uncaught_on_creation; | return uncaught_exceptions() <= m_uncaught_on_creation; | ||||
| } | } |