Relative Content

Tag Archive for c++multithreadingc++11

Start thread with member function

I am trying to construct a std::thread with a member function that takes no arguments and returns void. I can’t figure out any syntax that works – the compiler complains no matter what. What is the correct way to implement spawn() so that it returns a std::thread that executes test()?