Why does my C++ function, 'cannot determine which instance of overloaded function is intended'?

Viewed 1384

I am launching a std::async thread as follows;

cv::Point2f opDim = Point2f(1920, 1080);
cv::Point2f ipDim = Point2f(1920, 1080);
CameraToBEV cbevObj(roiBox1, opDim, ipDim);
    
std::vector<CameraToBEV> cbevVec;
for (int j = 0; j < jsonObjects.size(); j++)
        cbevVec.push_back(cbevObj);


// for multithreading
std::vector<std::future<cv::Mat>> processingThread;
std::vector<cv::Mat> opMatArr;
 
processingThread.emplace_back(std::async(std::launch::async, &CameraToBEV::process, &cbevVec[i], std::ref(jsonObjects[i]), roiBox1, opDim,ipDim));

I have the following overloaded process() function definitions;

cv::Mat process(json&);
cv::Mat process(json&, std::vector<cv::Point2f>);
cv::Mat process(json&, std::vector<cv::Point2f>, cv::Point2f);
cv::Mat process(json&, std::vector<cv::Point2f>, cv::Point2f, cv::Point2f);

I clearly have the function definition which I am passing to std::async. Why am I getting the error?

'cannot determine which instance of overloaded function is intended'

0 Answers
Related