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

Function main

test/on_error_accumulate_nested_error_result_test.cpp:48–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48int main()
49{
50 int r = leaf::try_handle_all(
51 []() -> leaf::result<int>
52 {
53 return f2();
54 },
55 []( info<0> i0, info<1> i1, info<2> i2, info<3> i3 )
56 {
57 BOOST_TEST_EQ(i0.value, 0);
58 BOOST_TEST_EQ(i1.value, 1);
59 BOOST_TEST_EQ(i2.value, 2);
60 BOOST_TEST_EQ(i3.value, 3);
61 return 1;
62 },
63 []
64 {
65 return 2;
66 } );
67 BOOST_TEST_EQ(r, 1);
68
69 return boost::report_errors();
70}

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