Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9303: packaged_task<R(Argtypes)> does not compile using c++03 and Cmake 2.8.9
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-02 13:40:22
#9303: packaged_task<R(Argtypes)> does not compile using c++03 and Cmake 2.8.9
-------------------------------+---------------------------------------
Reporter: e66a5b10@⦠| Owner: viboes
Type: Bugs | Status: assigned
Milestone: To Be Determined | Component: thread
Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords: packaged_task, bind, asio
-------------------------------+---------------------------------------
Comment (by viboes):
I'm really sorry. This doesn't works yet for non C++91 compilers. Here it
is the code
{{{
#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
template<typename R, typename ...ArgTypes>
class packaged_task<R(ArgTypes...)>
{
typedef
boost::shared_ptr<detail::task_base_shared_state<R(ArgTypes...)> >
task_ptr;
boost::shared_ptr<detail::task_base_shared_state<R(ArgTypes...)> >
task;
#else
template<typename R>
class packaged_task<R()>
{
typedef boost::shared_ptr<detail::task_base_shared_state<R()> >
task_ptr;
boost::shared_ptr<detail::task_base_shared_state<R()> > task;
#endif
}}}
As you can see, only if BOOST_THREAD_PROVIDES_VARIADIC_THREAD you can use
{{{
boost::packaged_task<std::string(std::string&)>
}}}
I'm not sure Example 5 is a bug on Boost.Thread, I suspect that this is
just not supported in C++03.
Unfortunately I have no time to develop this for C++03 compilers.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9303#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:14 UTC