MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / NoParams

Function NoParams

tests/LambdaWithStaticInvokerTest.cpp:3–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1// cmdline:-std=c++20
2
3void NoParams()
4{
5 auto l = []() {
6 static int n{};
7 return ++n;
8 };
9
10 bool res = (1 == l()); // 1
11 bool res2 = (2 == (+l)()); // 2
12}
13
14auto lWithParams = [](int x, int y) {
15 static int n{};

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected