#include <iostream>
#include <tuple>
using namespace std;

template<class Func, size_t index>
class ForwardsApplicator{
public:
	template<class ...Components>
    void operator()(Func func, const std::tuple<Components...>& t){
        ForwardsApplicator<Func, index - 1>()(func, t);
        func(std::get<index - 1>(t));
    }
};

template<class Func>
class ForwardsApplicator<Func, 0> {
public:
	template<class ...Components>
    void operator()(Func func, const std::tuple<Components...>& t){}
};

template<class Func, class ...Components>
void apply(Func func, const std::tuple<Components...>& t) {
	ForwardsApplicator<Func, sizeof...(Components)>()(func, t);
}



class Lambda{
public: 
   template<class T>
   void operator()(T arg){ std::cout << arg << "; "; }
};

int main() {
    apply(Lambda{}, std::make_tuple(1, 2.0f));
}
