Hi,

I just tried to compile my 1.52- based code with 1.54 beta and run into package_task compilation issue.

In 1.52 I was using BOOST_THREAD_VERSION=3 define but with 1.54 I complied with =4.

Test program:

#define BOOST_THREAD_VERSION 4

#include <boost/thread/future.hpp>
#include <boost/function.hpp>

struct MyFunc
{
  void operator()()const {}
};

int main()
{
  boost::function<void()> f;
  MyFunc mf;

  boost::packaged_task<void()> t1(f); // error 1
  boost::packaged_task<void()> t2(mf); // error 2
}


error 1 being:

d:\devel\boost_1_54_0_beta1\boost\thread\future.hpp(2848): error C2664: 'boost::detail::task_object<F,R>::task_object(boost::detail::task_object<F,R> &)' : cannot convert parameter 1 from 'boost::function<Signature>' to 'boost::detail::task_object<F,R> &'

and error 2 similarly:

d:\devel\boost_1_54_0_beta1\boost\thread\future.hpp(2848): error C2664: 'boost::detail::task_object<F,R>::task_object(boost::detail::task_object<F,R> &)' : cannot convert parameter 1 from 'MyFunc' to 'boost::detail::task_object<F,R> &'

(I tried with custom functor because I thought maybe error was related to boost function)

Compiling with Visual Studio 2012 Update 3

Regards,
Szymon Gatner