#include <iostream>
#include <functional>
#include <utility>

struct Foo {
    template <typename Function, typename... Args>
    Foo(Function&& func, Args&&... args) {
        auto f = std::bind(std::forward<Function>(func), std::forward<Args>(args)...);
        func_ = [f] { f(); };
    }
    void evaluate() { func_(); }
    std::function<void()> func_;
};

void printValues(int x, double y, const char* charArr) {
    std::cout << x << " " << y << " " << charArr << std::endl;
}

int main() {
    Foo f(printValues, 5, 2.0, "Test");
    f.evaluate();
}