With the expression
std::async(timeNext(start));
you actually call timeNext
yourself, and passing its return value (a bool
) to std::async
.
If you see e.g. this reference you will see that the std::async
function takes the function as first argument, and then the arguments to the function.
So you should do
std::async(&NuiSkeletonStream::timeNext, this, start);