Passing object by reference to std::thread in C++11 Passing object by reference to std::thread in C++11 multithreading multithreading