MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / print

Function print

07.14-printWithOrigin0/main.cpp:11–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10template<typename First, typename... Rest>
11void print(First&& first, Rest&&... args)
12{
13 std::cout << "[" << first << "]";
14
15 auto coutSpaceAndArg = [](const auto& arg) { std::cout << ' ' << arg; };
16
17 (..., coutSpaceAndArg(args));
18
19 std::cout << '\n';
20}
21
22int main()
23{

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected