| 33 | } // namespace std |
| 34 | |
| 35 | constexpr auto getSecond(DummyStruct const &d) |
| 36 | { |
| 37 | using namespace matchit; |
| 38 | Id<char const *> i; |
| 39 | return match(d)( |
| 40 | // clang-format off |
| 41 | pattern | ds(2, i) = expr(i), |
| 42 | pattern | _ = expr("not matched") |
| 43 | // clang-format on |
| 44 | ); |
| 45 | } |
| 46 | |
| 47 | // #if __cplusplus > 201703L |
| 48 | static_assert(getSecond(DummyStruct{1, "123"}) == |
no test coverage detected