#include <type_traits>
struct end_of_list;
template <typename T>
void f() {
static_assert(std::is_same<T, end_of_list>::value, "error");
}
template <typename T1, typename T2, typename... Ts>
void f() {
// do something with T
f<T2, Ts...>();
}
int main() {
f<int, float, char, end_of_list>();
return 0;
}
I2luY2x1ZGUgPHR5cGVfdHJhaXRzPgogCnN0cnVjdCBlbmRfb2ZfbGlzdDsKIAp0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4Kdm9pZCBmKCkgewogICAgc3RhdGljX2Fzc2VydChzdGQ6OmlzX3NhbWU8VCwgZW5kX29mX2xpc3Q+Ojp2YWx1ZSwgImVycm9yIik7Cn0KIAp0ZW1wbGF0ZSA8dHlwZW5hbWUgVDEsIHR5cGVuYW1lIFQyLCB0eXBlbmFtZS4uLiBUcz4Kdm9pZCBmKCkgewogICAgLy8gZG8gc29tZXRoaW5nIHdpdGggVAogICAgZjxUMiwgVHMuLi4+KCk7Cn0KIAppbnQgbWFpbigpIHsKICAgIGY8aW50LCBmbG9hdCwgY2hhciwgZW5kX29mX2xpc3Q+KCk7CiAgICByZXR1cm4gMDsKfQ==