I am creating a threadpool by using “https://github.com/alugowski/task-thread-pool/” and calling task using submit function but getting error
int Model::sum(int a, int b)
{
return 1;
}
void Model::SubscribeMLStatusCallBackFn(const MLStatusReceiveCallbackFn& statusCallback)
{
m_MLStatusCallback = statusCallback;
task_thread_pool::task_thread_pool pool;
std::future<int> sum_future = pool.submit(&sum, 1, 2);
sum_future.get();
}
Error :No instance of function template matches the argument list, argument types are: (std::string, CommandLineArgumentTypes)
But same working on
std::future<int> sum_future = pool.submit([] { return 1; });
Can someone tell me what error I am doing in calling submit using &sum function
1