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

Function test

tests/LambdaInVariadicTemplateTest.cpp:11–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10template<class T>
11decltype(auto) test(T&& value) {
12 return match(value
13 ,[](std::string value) { std::cout <<"This is string "; return value + " Hi!"; }
14 ,[](int i) { std::cout << "This is int "; return i * 100; }
15 ,[](auto a) { std::cout << "This is default ";return 0; }
16 );
17}
18
19int main() {
20 std::cout << test(200) << std::endl;

Callers 1

mainFunction · 0.70

Calls 1

matchFunction · 0.70

Tested by

no test coverage detected