http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57986
--- Comment #9 from yangzhe1990 at gmail dot com --- > <algorithm> is probably including <functional> Yes, you are right. <iterator> is not including <functional>. > Make the type non-copyable, and if you need to pass it around then use > shared_ptr<thread> Thanks. Anyway there seems no way to do { thread a; ... ; a = thread(some_function); } .