Re: [Boost-bugs] [Boost C++ Libraries] #4521: Error using boost::move on packaged_task (MSVC 10)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4521: Error using boost::move on packaged_task (MSVC 10)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-02 11:34:17


#4521: Error using boost::move on packaged_task (MSVC 10)
-------------------------------+--------------------------------------------
  Reporter: ZenJu | Owner: anthonyw
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.44.0 | Severity: Showstopper
Resolution: | Keywords:
-------------------------------+--------------------------------------------

Comment (by Claudio Bley):

 This example also fails with GCC 4.5.4 and 4.6.1 using -std=c++0x:

 {{{
 g++ -std=c++0x answer.cc -I /home/claudio/aux/include/boost-1_47/
 In file included from /home/claudio/aux/include/boost-
 1_47/boost/thread/thread.hpp:22:0,
                  from /home/claudio/aux/include/boost-
 1_47/boost/thread.hpp:13,
                  from answer.cc:1:
 /home/claudio/aux/include/boost-1_47/boost/thread/future.hpp: In
 constructor ‘boost::detail::thread_data<F>::thread_data(F&) [with F =
 boost::packaged_task<int>]’:
 /home/claudio/aux/include/boost-
 1_47/boost/thread/pthread/thread_heap_alloc.hpp:24:47: instantiated from
 â€˜T* boost::detail::heap_new(A1&&) [with T =
 boost::detail::thread_data<boost::packaged_task<int> >, A1 =
 boost::packaged_task<int>&]’
 /home/claudio/aux/include/boost-
 1_47/boost/thread/detail/thread.hpp:130:146: instantiated from ‘static
 boost::detail::thread_data_ptr boost::thread::make_thread_info(F&&) [with
 F = boost::packaged_task<int>&, boost::detail::thread_data_ptr =
 boost::shared_ptr<boost::detail::thread_data_base>]’
 /home/claudio/aux/include/boost-
 1_47/boost/thread/detail/thread.hpp:168:62: instantiated from
 â€˜boost::thread::thread(F&&) [with F = boost::packaged_task<int>&]’
 answer.cc:17:36: instantiated from here
 /home/claudio/aux/include/boost-1_47/boost/thread/future.hpp:1268:9:
 error: ‘boost::packaged_task<R>::packaged_task(boost::packaged_task<R>&)
 [with R = int, boost::packaged_task<R> = boost::packaged_task<int>]’ is
 private
 /home/claudio/aux/include/boost-1_47/boost/thread/detail/thread.hpp:49:21:
 error: within this context
 }}}
 There are only 2 overloads of boost::move, and these don't work for a
 packaged_task.

 boost::move should be equivalent to std::move ifndef
 BOOST_NO_RVALUE_REFERENCES, shouldn't it?

 Simply
 {{{
 #!cpp
 namespace boost {
   using std::move;
 }
 }}}
 works with MSVC 10 and GCC 4.5, 4.6.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4521#comment:3>
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:07 UTC