Skip to content

Instantly share code, notes, and snippets.

@mryoshio
Created April 5, 2014 08:37
Show Gist options
  • Save mryoshio/9989115 to your computer and use it in GitHub Desktop.
Save mryoshio/9989115 to your computer and use it in GitHub Desktop.
variadic template sample
void f() {} // do nothing
template<typename T, typename... Tail>
void f(T head, Tail... tail)
{
g(head); // headに対し何かする
f(tail...); // 再度tailに対し実行
}
@mryoshio
Copy link
Author

mryoshio commented Apr 5, 2014

C++ 5.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment