| 29 | |
| 30 | template <class G> |
| 31 | void test( G && g ) |
| 32 | { |
| 33 | int r = leaf::try_handle_all( |
| 34 | [&]() -> leaf::result<int> |
| 35 | { |
| 36 | return f(std::move(g)); |
| 37 | }, |
| 38 | []( info<42> const & i42, leaf::diagnostic_info const & di ) |
| 39 | { |
| 40 | BOOST_TEST_EQ(i42.value, 42); |
| 41 | return 1; |
| 42 | }, |
| 43 | [] |
| 44 | { |
| 45 | return 2; |
| 46 | } ); |
| 47 | BOOST_TEST_EQ(r, 1); |
| 48 | } |
| 49 | |
| 50 | int main() |
| 51 | { |
no test coverage detected