[Boost-bugs] [Boost C++ Libraries] #4396: thread does not compile with gcc 4.5 and -std=gnu++0x

Subject: [Boost-bugs] [Boost C++ Libraries] #4396: thread does not compile with gcc 4.5 and -std=gnu++0x
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-30 08:28:49


#4396: thread does not compile with gcc 4.5 and -std=gnu++0x
----------------------------------------+-----------------------------------
 Reporter: vincenzo.innocente@… | Owner:
     Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: None
  Version: Boost 1.42.0 | Severity: Showstopper
 Keywords: |
----------------------------------------+-----------------------------------
 the easiest way to see the problem is

 cp boost-1_42/boost/thread.hpp .
 c++ -pthread -O2 -Iboost-1_42/ -std=gnu++0x thread.hpp
 In file included from boost-1_42/boost/thread/thread.hpp:22:0,
                  from thread.hpp:13:
 boost-1_42/boost/thread/detail/thread.hpp: In function 'boost::thread&&
 boost::move(boost::thread&&)':
 boost-1_42/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-
 1_42/boost/thread/detail/thread_heap_alloc.hpp:17:0,
                  from boost-1_42/boost/thread/detail/thread.hpp:13,
                  from boost-1_42/boost/thread/thread.hpp:22,
                  from thread.hpp:13:
 boost-1_42/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-1_42/boost/thread/detail/thread.hpp:130:95: instantiated from here
 boost-1_42/boost/thread/pthread/thread_heap_alloc.hpp:24:47: error: cannot
 bind 'void (*)()' lvalue to 'void (*&&)()'
 boost-1_42/boost/thread/detail/thread.hpp:43:13: error: initializing
 argument 1 of 'boost::detail::thread_data<F>::thread_data(F&&) [with F =
 void (*)()]'
 In file included from boost-1_42/boost/thread/pthread/mutex.hpp:11:0,
                  from boost-1_42/boost/thread/mutex.hpp:16,
                  from boost-1_42/boost/thread/pthread/thread_data.hpp:12,
                  from boost-1_42/boost/thread/thread.hpp:17,
                  from thread.hpp:13:
 boost-1_42/boost/thread/locks.hpp: In member function
 'boost::unique_lock<Mutex>&
 boost::unique_lock<Mutex>::operator=(boost::unique_lock<Mutex>&&) [with
 Mutex = boost::mutex, boost::unique_lock<Mutex> =
 boost::unique_lock<boost::mutex>]':
 boost-1_42/boost/thread/future.hpp:414:91: instantiated from here
 boost-1_42/boost/thread/locks.hpp:269:13: error: cannot bind
 'boost::unique_lock<boost::mutex>' lvalue to
 'boost::unique_lock<boost::mutex>&&'
 boost-1_42/boost/thread/locks.hpp:279:14: error: initializing argument 1
 of 'void boost::unique_lock<Mutex>::swap(boost::unique_lock<Mutex>&&)
 [with Mutex = boost::mutex, boost::unique_lock<Mutex> =
 boost::unique_lock<boost::mutex>]'


 c++ being either
 GNU C++ (GCC) version 4.5.0 (x86_64-unknown-linux-gnu)
         compiled by GNU C version 4.5.0, GMP version 4.3.2, MPFR version
 2.4.2, MPC version 0.8.1
 or
 GNU C++ (GCC) version 4.6.0 20100408 (experimental) (x86_64-unknown-linux-
 gnu)
         compiled by GNU C version 4.6.0 20100408 (experimental), GMP
 version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4396>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC