MCPcopy Create free account
hub / github.com/boostorg/leaf / main

Function main

test/on_error_preload_nested_error_result_test.cpp:40–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40int main()
41{
42 int r = leaf::try_handle_all(
43 []() -> leaf::result<int>
44 {
45 return f2();
46 },
47 []( info<0> i0, info<1> i1, info<2> i2, info<3> i3 )
48 {
49 BOOST_TEST_EQ(i0.value, 0);
50 BOOST_TEST_EQ(i1.value, 1);
51 BOOST_TEST_EQ(i2.value, 2);
52 BOOST_TEST_EQ(i3.value, 3);
53 return 1;
54 },
55 []
56 {
57 return 2;
58 } );
59 BOOST_TEST_EQ(r, 1);
60
61 return boost::report_errors();
62}

Callers

nothing calls this directly

Calls 3

try_handle_allFunction · 0.85
report_errorsFunction · 0.85
f2Function · 0.70

Tested by

no test coverage detected