Based on
this doc, boost::async is defined as follows:
template <class F>
future<typename result_of<typename decay<F>::type()>::type>
async(F f);
template <class F>
future<typename result_of<typename decay<F>::type()>::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), 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