2
0
mirror of https://github.com/boostorg/leaf.git synced 2026-02-22 15:32:24 +00:00

Refactored on_error behavior in the presence of a dynamic allocator

This commit is contained in:
Emil Dotchevski
2026-02-11 18:29:21 -05:00
parent 552ff261e9
commit bd58aa238c
8 changed files with 20 additions and 480 deletions

View File

@@ -71,21 +71,6 @@ int main()
return leaf::new_error();
});
#if BOOST_LEAF_CFG_CAPTURE
(void) leaf::try_capture_all(
[]() -> leaf::result<void>
{
leaf::detail::dynamic_allocator * da = leaf::detail::get_dynamic_allocator();
BOOST_TEST_NE(da, nullptr);
BOOST_TEST_EQ(da->preloaded_list(), nullptr);
{
auto load = leaf::on_error( info<42>{42} );
BOOST_TEST_NE(da->preloaded_list(), nullptr);
}
BOOST_TEST_EQ(da->preloaded_list(), nullptr);
return { };
} );
#endif
return boost::report_errors();
}