When trying the following code:
Concurrency::concurrent_vector<int> results_temp;
std::set<int > temp;
Concurrency::parallel_for_each(temp.begin(), temp.end(),[&](int p) {
results_temp.push_back(p);
});
I get the following compile time error:
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ppl.h(2081): error C2440: '=' : cannot convert from 'const int *' to 'int *'
I have managed to get parallel_for_each to work with std::deque<>, std::list<>, std::vector<>, and std::map<>.
I am curious how to get it to work for std::set<> or why it would not be supported.
The example code compiled without error for me.
I added these includes:
Do you have SP1 installed?