lundi 28 décembre 2015

How to specify function signature for function that returns result of async?

I have a function that does this:

??? createThread(int x) {
   return async(std::launch::async, 
      [x] () { // do stuff with x });
}

I am using VS 2012 (partial C++11). What should the return type be to make this compile?

Aucun commentaire:

Enregistrer un commentaire