123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef BOOST_CONTEXT_DETAIL_EXCEPTION_H
- #define BOOST_CONTEXT_DETAIL_EXCEPTION_H
- #include <boost/assert.hpp>
- #include <boost/config.hpp>
- #include <boost/context/detail/fcontext.hpp>
- #ifdef BOOST_HAS_ABI_HEADERS
- # include BOOST_ABI_PREFIX
- #endif
- namespace boost {
- namespace context {
- namespace detail {
- struct forced_unwind {
- fcontext_t fctx{ nullptr };
- #ifndef BOOST_ASSERT_IS_VOID
- bool caught{ false };
- #endif
- forced_unwind() = default;
- forced_unwind( fcontext_t fctx_) :
- fctx( fctx_) {
- }
- #ifndef BOOST_ASSERT_IS_VOID
- ~forced_unwind() {
- BOOST_ASSERT( caught);
- }
- #endif
- };
- }}}
- #ifdef BOOST_HAS_ABI_HEADERS
- #include BOOST_ABI_SUFFIX
- #endif
- #endif
|