template <typename C, typename F, typename... Args>
void MyClass::run(F C::*f, C* c, Args&&... args) {
td_ = std::make_unique<std::thread>(
[](F C::*f, C* c, Args... args){ // Is this correct?
c.f(args...); // should I code c.f(std::forward<Args>(args)...); here?
});
}
I know what std::forward is used for. But in the case above, the types of parameters are passed to a lambda, which is in the template function. I'm kind of confused now...