Even without lambdas, a normal function would work. Just use function pointers and std::bind.