struct forced_unwind {
activation_record * from{ nullptr };
-#ifndef BOOST_ASSERT_IS_VOID
- bool caught{ false };
-#endif
forced_unwind( activation_record * from_) noexcept :
from{ from_ } {
}
-
-#ifndef BOOST_ASSERT_IS_VOID
- ~forced_unwind() {
- BOOST_ASSERT( caught);
- }
-#endif
};
template< typename Ctx, typename StackAlloc, typename Fn >
#endif
} catch ( forced_unwind const& ex) {
c = Ctx{ ex.from };
-#ifndef BOOST_ASSERT_IS_VOID
- const_cast< forced_unwind & >( ex).caught = true;
-#endif
}
// this context has finished its task
from = nullptr;