template <typename...> struct types_helper {};
// base case
void f(types_helper<>) {}
template <typename T, typename... Ts>
void f(types_helper<T, Ts...>) {
// do something with T
f(types_helper<Ts...>());
}
int main() {
f(types_helper<int, float, char>());
return 0;
}
dGVtcGxhdGUgPHR5cGVuYW1lLi4uPiBzdHJ1Y3QgdHlwZXNfaGVscGVyIHt9OwoKLy8gYmFzZSBjYXNlCnZvaWQgZih0eXBlc19oZWxwZXI8Pikge30KCnRlbXBsYXRlIDx0eXBlbmFtZSBULCB0eXBlbmFtZS4uLiBUcz4Kdm9pZCBmKHR5cGVzX2hlbHBlcjxULCBUcy4uLj4pIHsKICAgIC8vIGRvIHNvbWV0aGluZyB3aXRoIFQKICAgIGYodHlwZXNfaGVscGVyPFRzLi4uPigpKTsKfQoKaW50IG1haW4oKSB7CiAgICBmKHR5cGVzX2hlbHBlcjxpbnQsIGZsb2F0LCBjaGFyPigpKTsKICAgIHJldHVybiAwOwp9