Re: [Boost-users] Compiler limitation (MSVS 2015 update 2) or real error using boost::async?
Hi, in case anyone wants to play with the example I provided but doesn't have access to MSVC you can do so online here. http://rextester.com/BAX37541 kind regards, James
Based on this
http://www.boost.org/doc/libs/1_52_0/doc/html/thread/synchronization.html#th...
doc, boost::async is defined as follows:
template <class F>
future http://www.boost.org/doc/libs/1_52_0/doc/html/thread/synchronization.html#th...
Hi,
in case anyone wants to play with the example I provided but doesn't have access to MSVC you can do so online here.
kind regards, James
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Juan :wq
In case anyone else gets this someone else gave me the tip to use
`boost::executor_adaptor<TestEx> tex;`
And a link to this discussion
http://www.boost.org/doc/libs/1_60_0/doc/html/thread/synchronization.html#th...
kind regards,
James
On 5 May 2016 at 19:02, Juan Ramírez
Based on this http://www.boost.org/doc/libs/1_52_0/doc/html/thread/synchronization.html#th... doc, boost::async is defined as follows:
template <class F> future http://www.boost.org/doc/libs/1_52_0/doc/html/thread/synchronization.html#th...
::type>async(F f);template <class F> future http://www.boost.org/doc/libs/1_52_0/doc/html/thread/synchronization.html#th... ::type>async(launch policy, F f); In your example you are calling the second overload, which takes a launch policy in its first argument, boost::launch is an enum (se here http://www.boost.org/doc/libs/1_58_0/boost/thread/futures/launch.hpp), i guess the compiler is failing trying to create an enum from your class instance.
I tried your example using boost::launch::async and capturing your tex object: didn't have any problems at all.
Best regards, Juan
On Thu, May 5, 2016 at 9:18 AM, James Swift
wrote: Hi,
in case anyone wants to play with the example I provided but doesn't have access to MSVC you can do so online here.
kind regards, James
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Juan :wq
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
James Swift
-
Juan Ramírez