id summary reporter owner description type status milestone component version severity resolution keywords cc 2144 boost::thread constructor wants to make copies of the argument mmikucionis@… Anthony Williams "Hi, I noticed that boost::thread constructor makes a copy of its argument. Suppose I have a big structure that I use as thread context and I don't want redundant copies on stack or anywhere else. For example: struct foo { void operator()() { // zzz } private: foo(foo&); // no copying, please }; boost::thread(foo()); // this fails due to private copy constructor I bumped into this problem when I included boost::thread itself into the structure (forbids copying too ;). Thus I wonder if the argument could be replaced by a reference to an argument which would not insist on copying things. As a workaround I do the following now: void bar(foo *ptr) { (*ptr)(); } boost::thread(boost::bind(bar, new foo)); I looked at repository on the web and I could not find class thread anymore (moved somewhere else since 1.35?), so maybe it's already fixed... Thanks for great library!" Bugs closed Boost 1.36.0 thread Boost 1.35.0 Optimization wontfix