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

Function test

tests/Issue102.cpp:71–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70template<class T>
71decltype(auto) test(T&& value) {
72 return match(value
73 ,[](std::string value) { std::cout << "This is string "; return value + " Hi!"; }
74 ,[](int i) { std::cout << "This is int "; return i * 100; }
75 ,[](auto a) { std::cout << "This is default ";return 0; }
76 );
77}
78
79int main() {
80 std::cout << test(200) << std::endl;

Callers 1

mainFunction · 0.70

Calls 1

matchFunction · 0.70

Tested by

no test coverage detected