Compilation of boost_1_42_0 fails with errors.

bash-3.2# g++ --version
g++ (GCC) 4.5.0

bash-3.2# g++  -ftemplate-depth-128 -finline-functions -Wno-inline -Wall
-dynamic -std=gnu++0x  -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1
-DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o
"bin.v2/libs/thread/build/darwin-4.5.0/release/threading-multi/pthread/thread.o"
"libs/thread/src/pthread/thread.cpp"
In file included from ./boost/thread/thread.hpp:22:0,
                 from libs/thread/src/pthread/thread.cpp:10:
./boost/thread/detail/thread.hpp: In function 'boost::thread&&
boost::move(boost::thread&&)':
./boost/thread/detail/thread.hpp:349:16: error: invalid initialization of
reference of type 'boost::thread&&' from expression of type 'boost::thread'
In file included from ./boost/thread/detail/thread_heap_alloc.hpp:17:0,
                 from ./boost/thread/detail/thread.hpp:13,
                 from ./boost/thread/thread.hpp:22,
                 from libs/thread/src/pthread/thread.cpp:10:
./boost/thread/pthread/thread_heap_alloc.hpp: In function 'T*
boost::detail::heap_new(A1&&) [with T = boost::detail::thread_data<void (*)()>,
A1 = void (*&)()]':
./boost/thread/detail/thread.hpp:130:95:   instantiated from here
./boost/thread/pthread/thread_heap_alloc.hpp:24:47: error: cannot bind 'void
(*)()' lvalue to 'void (*&&)()'
./boost/thread/detail/thread.hpp:43:13: error:   initializing argument 1 of
'boost::detail::thread_data<F>::thread_data(F&&) [with F = void (*)()]'
bash-3.2#


-- 
           Summary: Compiler flags error: error: invalid initialization of
                    reference of type 'boost::thread&&' from expression of
                    type 'boost::thread'
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mlrus at mac dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43915

Reply via email to