std::thread pass by reference calls copy constructor
问题 Well I have an issue with passing data into a thread using std::thread. I thought I understood the general semantics of copy constructors, etc. but it seems I don\'t quite grasp the problem. I have a simple class called Log that has hidden it\'s copy constructor thusly: class Log { public: Log(const char filename[], const bool outputToConsole = false); virtual ~Log(void); //modify behavior void appendStream(std::ostream *); //commit a new message void commitStatus(const std::string str);