Skip to content

Commit

Permalink
gha
Browse files Browse the repository at this point in the history
  • Loading branch information
zajo committed Dec 10, 2023
1 parent fae0104 commit 629cbec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions include/boost/leaf/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,27 +804,18 @@ class context_activator
context_activator( context_activator const & ) = delete;
context_activator & operator=( context_activator const & ) = delete;

#if !defined(BOOST_LEAF_NO_EXCEPTIONS) && BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS
int const uncaught_exceptions_;
#endif
Ctx * ctx_;

public:

explicit BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE context_activator(Ctx & ctx) noexcept:
#if !defined(BOOST_LEAF_NO_EXCEPTIONS) && BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS
uncaught_exceptions_(std::uncaught_exceptions()),
#endif
ctx_(ctx.is_active() ? nullptr : &ctx)
{
if( ctx_ )
ctx_->activate();
}

BOOST_LEAF_CONSTEXPR BOOST_LEAF_ALWAYS_INLINE context_activator( context_activator && x ) noexcept:
#if !defined(BOOST_LEAF_NO_EXCEPTIONS) && BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS
uncaught_exceptions_(x.uncaught_exceptions_),
#endif
ctx_(x.ctx_)
{
x.ctx_ = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion test/context_deduction_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void not_called_on_purpose()
test< std::tuple<info<1>,info<2>,info<3>> >( expd([]( info<1> const, info<2> ){ }, []( info<1> const *, info<3> ){ }) );

test< std::tuple<info<1>,info<2>> >( expd([]( info<1>, info<2>, leaf::diagnostic_info const & ){ }, []( info<1>, info<2> ){ }) );
#if BOOST_LEAF_CFG_DIAGNOSTICS
#if BOOST_LEAF_CFG_DIAGNOSTICS && BOOST_LEAF_CFG_CAPTURE
test< std::tuple<info<1>,info<2>,leaf::leaf_detail::dynamic_allocator> >( expd([]( info<1>, info<2>, leaf::verbose_diagnostic_info const & ){ }, []( info<1>, info<2> ){ }) );
#else
test< std::tuple<info<1>,info<2>> >( expd([]( info<1>, info<2> ){ }, []( info<1>, leaf::verbose_diagnostic_info const &, info<2> ){ }) );
Expand Down

0 comments on commit 629cbec

Please sign in to comment.