MCPcopy Create free account
hub / github.com/BowenFu/matchit.cpp / main

Function main

sample/Matching-Integrals.cpp:4–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <iostream>
3
4int32_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}

Callers

nothing calls this directly

Calls 1

matchFunction · 0.50

Tested by

no test coverage detected