Boost C++ Libraries: Ticket #2380: boost::move from lvalue does not work with gcc https://svn.boost.org/trac10/ticket/2380 <p> boost::thread make_thread1() { </p> <blockquote> <p> boost::thread x=make_thread(); return boost::move(x); </p> </blockquote> <p> } </p> <p> Compilation of the function above produces the following error with gcc-3.4.4 and 4.3.2: </p> <p> gcc.compile.c++ ../../../bin.v2/libs/thread/test/test_thread_move.test/gcc-3.4.4 /debug/threading-multi/test_thread_move.o test_thread_move.cpp: In function `boost::thread make_thread1()': test_thread_move.cpp:31: error: no matching function for call to `boost::thread: :thread(boost::thread)' ../../../boost/thread/detail/thread.hpp:200: note: candidates are: boost::thread ::thread(boost::detail::thread_move_t&lt;boost::thread&gt;) ../../../boost/thread/detail/thread.hpp:108: note: boost::thread::thread(boost: :thread&amp;) test_thread_move.cpp:31: error: initializing temporary from result of `boost:: thread::thread(boost::detail::thread_move_t&lt;boost::thread&gt;)' </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2380 Trac 1.4.3 anonymous Thu, 02 Oct 2008 07:44:52 GMT attachment set https://svn.boost.org/trac10/ticket/2380 https://svn.boost.org/trac10/ticket/2380 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_thread_move.cpp</span> </li> </ul> Ticket Anthony Williams Thu, 02 Oct 2008 16:40:13 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2380#comment:1 https://svn.boost.org/trac10/ticket/2380#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed on trunk, revision 49112 </p> Ticket anonymous Sat, 11 Sep 2010 07:25:11 GMT version, milestone changed https://svn.boost.org/trac10/ticket/2380#comment:2 https://svn.boost.org/trac10/ticket/2380#comment:2 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.35.0</span> → <span class="trac-field-new">Boost 1.44.0</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.37.0</span> → <span class="trac-field-new">Boost 1.44.0</span> </li> </ul> <p> Got the same problem on boost 1_44_0 on MacOSX 10.6.4 gcc 4.2.1 </p> <p> $ g++ test_thread_move.cpp -lboost_thread </p> <p> test_thread_move.cpp: In function ‘boost::thread make_thread1()’: </p> <p> test_thread_move.cpp:31: error: no matching function for call to ‘boost::thread::thread(boost::thread)’ </p> <p> /usr/local/include/boost/thread/detail/thread.hpp:215: note: candidates are: </p> <p> boost::thread::thread(boost::detail::thread_move_t&lt;boost::thread&gt;) </p> <p> /usr/local/include/boost/thread/detail/thread.hpp:113: note: boost::thread::thread(boost::thread&amp;) </p> <p> test_thread_move.cpp:31: error: initializing temporary from result of ‘boost::thread::thread(boost::detail::thread_move_t&lt;boost::thread&gt;)’ </p> <p> $ uname -a </p> <p> Darwin macbook-pro.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 </p> <p> $ g++ -v </p> <p> Using built-in specs. </p> <p> Target: i686-apple-darwin10 </p> <p> Configured with: /var/tmp/gcc/gcc-5664~50/src/configure --disable-checking --enable-werror --prefix=/usr -- mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/<sup>[cg][</sup>.-]*$/s/$/-4.2/ --with- slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 -- target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 </p> <p> Thread model: posix </p> <p> gcc version 4.2.1 (Apple Inc. build 5664) </p> Ticket viboes Thu, 28 Oct 2010 17:53:24 GMT status, milestone changed; resolution deleted https://svn.boost.org/trac10/ticket/2380#comment:3 https://svn.boost.org/trac10/ticket/2380#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.44.0</span> → <span class="trac-field-new">Boost-1.45.0</span> </li> </ul> <p> It seems that this ticket should be reopened. </p> Ticket viboes Sun, 11 Dec 2011 11:38:54 GMT milestone changed; keywords set https://svn.boost.org/trac10/ticket/2380#comment:4 https://svn.boost.org/trac10/ticket/2380#comment:4 <ul> <li><strong>keywords</strong> thread added </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.45.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> <p> The is an action point to use Boost.Move. Could we consider this as a duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6194" title="#6194: Feature Requests: Adapt to Boost.Move (closed: fixed)">#6194</a> Adapt to Boost.Move. </p> Ticket viboes Sun, 11 Dec 2011 16:38:13 GMT keywords changed https://svn.boost.org/trac10/ticket/2380#comment:5 https://svn.boost.org/trac10/ticket/2380#comment:5 <ul> <li><strong>keywords</strong> move added </li> </ul> Ticket viboes Sat, 21 Jan 2012 23:28:55 GMT milestone changed https://svn.boost.org/trac10/ticket/2380#comment:6 https://svn.boost.org/trac10/ticket/2380#comment:6 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.50.0</span> </li> </ul> <p> This test pass on trunk now. </p> Ticket viboes Sun, 08 Apr 2012 22:14:30 GMT owner, status changed https://svn.boost.org/trac10/ticket/2380#comment:7 https://svn.boost.org/trac10/ticket/2380#comment:7 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">new</span> </li> </ul> Ticket viboes Mon, 28 May 2012 16:25:59 GMT <link>https://svn.boost.org/trac10/ticket/2380#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2380#comment:8</guid> <description> <p> Committed in release branch at <a class="changeset" href="https://svn.boost.org/trac10/changeset/78543" title="Merged boost.thread from trunk">[78543]</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 28 May 2012 16:27:16 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2380#comment:9 https://svn.boost.org/trac10/ticket/2380#comment:9 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket