C++: VS IntelliSense and the return value of std::async

99 views Asked by At

I have a piece of code which uses std::async. This is the function I call via async:

cv::Mat CtVolume::prepareProjection(size_t index, FilterType filterType) const

As one can see, it's return value is cv::Mat.

Now somewhere in my code I declare a variable for the return of the async call like this:

std::future<cv::Mat> future;

And at some other point the actual call looks like this:

future = std::async(std::launch::async, &CtVolume::prepareProjection, this, projection + 1, filterType);

Now, in this line IntelliSense underlines the equality sign and displays the following error message:

IntelliSense: no operator "=" matches these operands 
operand types are: std::future<cv::Mat> = std::future<cv::Mat (&)(unsigned long long, ct::FilterType)

However, the code compiles and runs fine. Now, is this just an IntelliSense issue or should I declare my return value somehow differently? IDE is Visual Studio 2013.

0

There are 0 answers