#include <iostream>
#include <functional>
#include <typeinfo>

template <template <class...> class U, class T, unsigned N>
struct Combine {
    typedef U<void(typename Combine<U, T, N - 1>::type)> type;
};

template <template <class...> class U, class T>
struct Combine<U, T, 0> {
    typedef T type;
};

int main() {
    Combine<std::function, void(void), 899>::type f;
    
    std::cout << "f: " << typeid(f).name();
}