| 2 | #include <iostream> |
| 3 | |
| 4 | int32_t main() |
| 5 | { |
| 6 | using namespace matchit; |
| 7 | constexpr int32_t x = 5; |
| 8 | match(x)( |
| 9 | // clang-format off |
| 10 | pattern | 0 = [&] { std::cout << "got zero"; }, |
| 11 | pattern | 1 = [&] { std::cout << "got one"; }, |
| 12 | pattern | _ = [&] { std::cout << "don't care"; }); |
| 13 | // clang-format on |
| 14 | return 0; |
| 15 | } |