| 4 | |
| 5 | template <typename Map, typename Key> |
| 6 | constexpr bool contains(Map const &map, Key const &key) |
| 7 | { |
| 8 | using namespace matchit; |
| 9 | return match(map.find(key))( |
| 10 | // clang-format off |
| 11 | pattern | map.end() = expr(false), |
| 12 | pattern | _ = expr(true) |
| 13 | // clang-format on |
| 14 | ); |
| 15 | } |
| 16 | |
| 17 | int32_t main() |
| 18 | { |