MCPcopy Create free account
hub / github.com/changkun/modern-cpp-tutorial / printf2

Function printf2

code/2/2.6.cpp:56–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54// 2.初始化列表展开解参数包
55template<typename T, typename... Args>
56auto printf2(T value, Args... args) {
57 std::cout << value << std::endl;
58 return std::initializer_list<T>{([&] {
59 std::cout << args << std::endl;
60 }(), value)...};
61}
62
63int main() {
64

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected