|
Boost Users : |
Subject: Re: [Boost-users] problems with Boost.Thread on VS10
From: Igor R (boost.lists_at_[hidden])
Date: 2012-04-05 03:32:12
> I'm trying to use a packaged_task, and get an error on creation.
>
> Â Â Â Â template<typename R,typename F>
> Â Â Â Â 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<R,F>::task_object(F)' : member function already
> defined or declared
> Â Â Â Â Â with
> Â Â Â Â Â [
> Â Â Â Â Â Â Â R=size_t,
>
> Â F=std::tr1::_Bind<size_t,size_t,std::tr1::_Bind1<std::tr1::_Callable_fun<size_t
> (__cdecl *const )(std::string &),false>,const char *>> &
> Â Â Â Â Â ]
> Â Â Â Â Â E:\boost_1_49\boost/thread/future.hpp(1247) : see declaration of
> 'boost::detail::task_object<R,F>::task_object'
> Â Â Â Â Â with
> Â Â Â Â Â [
> Â Â Â Â Â Â Â R=size_t,
>
> Â F=std::tr1::_Bind<size_t,size_t,std::tr1::_Bind1<std::tr1::_Callable_fun<size_t
> (__cdecl *const )(std::string &),false>,const char *>> &
> Â Â Â Â Â ]
Can you provide a trivial example that reproduces the issue?
#include <boost/thread.hpp>
int main()
{
???
}
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net