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

Function main

test/on_error_accumulate_basic_test.cpp:35–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35int main()
36{
37 int r = leaf::try_handle_all(
38 []() -> leaf::result<int>
39 {
40 return f();
41 },
42 []( info<1> const & a, info<2> const & b )
43 {
44 BOOST_TEST_EQ(a.value, 2);
45 BOOST_TEST_EQ(b.value, 1);
46 return 1;
47 },
48 []
49 {
50 return 2;
51 } );
52 BOOST_TEST_EQ(r, 1);
53 return boost::report_errors();
54}

Callers

nothing calls this directly

Calls 3

try_handle_allFunction · 0.85
report_errorsFunction · 0.85
fFunction · 0.70

Tested by

no test coverage detected