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

Function print_answer

example/exception_to_result.cpp:48–53  ·  view source on GitHub ↗

Print the answer if the call to compute_answer is successful.

Source from the content-addressed store, hash-verified

46
47// Print the answer if the call to compute_answer is successful.
48leaf::result<void> print_answer() noexcept
49{
50 BOOST_LEAF_AUTO( answer, compute_answer());
51 std::cout << "Answer: " << answer << std::endl;
52 return { };
53}
54
55
56int main()

Callers 1

mainFunction · 0.85

Calls 1

compute_answerFunction · 0.70

Tested by

no test coverage detected