Opened 14 years ago
Closed 10 years ago
#2380 closed Bugs (fixed)
boost::move from lvalue does not work with gcc
Reported by: | anonymous | Owned by: | viboes |
---|---|---|---|
Milestone: | Boost 1.50.0 | Component: | thread |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | move thread | Cc: |
Description
boost::thread make_thread1() {
boost::thread x=make_thread(); return boost::move(x);
}
Compilation of the function above produces the following error with gcc-3.4.4 and 4.3.2:
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<boost::thread>) ../../../boost/thread/detail/thread.hpp:108: note: boost::thread::thread(boost: :thread&) test_thread_move.cpp:31: error: initializing temporary from result of `boost:: thread::thread(boost::detail::thread_move_t<boost::thread>)'
Attachments (1)
Change History (10)
by , 14 years ago
Attachment: | test_thread_move.cpp added |
---|
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 12 years ago
Milestone: | Boost 1.37.0 → Boost 1.44.0 |
---|---|
Version: | Boost 1.35.0 → Boost 1.44.0 |
Got the same problem on boost 1_44_0 on MacOSX 10.6.4 gcc 4.2.1
$ g++ test_thread_move.cpp -lboost_thread
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)’
/usr/local/include/boost/thread/detail/thread.hpp:215: note: candidates are:
boost::thread::thread(boost::detail::thread_move_t<boost::thread>)
/usr/local/include/boost/thread/detail/thread.hpp:113: note: boost::thread::thread(boost::thread&)
test_thread_move.cpp:31: error: initializing temporary from result of ‘boost::thread::thread(boost::detail::thread_move_t<boost::thread>)’
$ uname -a
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
$ g++ -v
Using built-in specs.
Target: i686-apple-darwin10
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=/[cg][.-]*$/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
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)
comment:3 by , 12 years ago
Milestone: | Boost 1.44.0 → Boost-1.45.0 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
It seems that this ticket should be reopened.
comment:4 by , 11 years ago
Keywords: | thread added |
---|---|
Milestone: | Boost 1.45.0 → To Be Determined |
The is an action point to use Boost.Move. Could we consider this as a duplicate of #6194 Adapt to Boost.Move.
comment:5 by , 11 years ago
Keywords: | move added |
---|
comment:7 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:9 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed on trunk, revision 49112