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

Function main

test/diagnostics_test4.cpp:52–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52int main()
53{
54 leaf::try_handle_all([]() -> leaf::result<void>
55 {
56 return f2();
57 },
58 [](leaf::diagnostic_details const & e)
59 {
60#if BOOST_LEAF_CFG_STD_STRING
61 std::ostringstream st;
62 st << e;
63 std::string s = st.str();
64 std::cout << s << std::endl;
65 if( BOOST_LEAF_CFG_DIAGNOSTICS && BOOST_LEAF_CFG_CAPTURE )
66 {
67 BOOST_TEST_NE(s.find("appended: 42"), s.npos);
68 BOOST_TEST_NE(s.find("appended: 43"), s.npos);
69 }
70#endif
71 } );
72
73 return boost::report_errors();
74}

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