I am trying to create a new thread with a recursive function call to the function itself:
std::async(std::launch::async, &CQSort<typename T>::qSort1, arr, start, p-1);
p is defined as an integer in a local variable.
The function qSort1 is implemented as
template <typename T>
void CQSort<typename T>::qSort1(T &arr, int start, int end)
{...}
I am getting a compilation error in the async call.
Error C2672 'std::async': no matching overloaded function found
This compiles and runs. I'm not sure it's entirely correct, though.
Note in particular that you need to pass a pointer to an object after the member-function pointer, since a member function needs an object to be called from.