I'm trying to use a packaged_task, and get an error on creation.
template
struct task_object:
task_base<R>
{
F f;
task_object(F const& f_): // << refers to look here
f(f_)
{}
#ifndef BOOST_NO_RVALUE_REFERENCES
task_object(F&& f_): // <<<< Error here
f(f_)
{}
E:\boost_1_49\boost/thread/future.hpp(1251): error C2535:
'boost::detail::task_object::task_object(F)' : member function already defined or
declared
with
[
R=size_t,
F=std::tr1::_Bind,const char *>> &
]
E:\boost_1_49\boost/thread/future.hpp(1247) : see declaration of
'boost::detail::task_object::task_object'
with
[
R=size_t,
F=std::tr1::_Bind,const char *>> &
]
So I'm thinking that VS10 (Microsoft Visual Studio 2010) has problems overloading the
constructor with (T const&) and (T&&) ? But shouldn't someone have noticed that long ago?
Any ideas here?
Thanks,
—John