| 60 | } |
| 61 | |
| 62 | void test3(int a) |
| 63 | { |
| 64 | int x = 0; |
| 65 | leaf::try_catch( |
| 66 | [&] |
| 67 | { |
| 68 | auto val = test2(a); |
| 69 | (void) val; |
| 70 | }, |
| 71 | [&](leaf::match<ErrorCode, ErrorCode::E_GENERIC_PARSE>) |
| 72 | { |
| 73 | x = 1; |
| 74 | }, |
| 75 | [&](ErrorCode e) |
| 76 | { |
| 77 | x = 2; |
| 78 | }, |
| 79 | [&]() |
| 80 | { |
| 81 | x = 3; |
| 82 | } |
| 83 | ); |
| 84 | BOOST_TEST_EQ(x, 1); |
| 85 | } |
| 86 | |
| 87 | int main() |
| 88 | { |