Changed code slightly to avoid a bug in gcc 4.1.2

This commit is contained in:
Davis King 2013-03-03 16:27:49 -05:00
parent 99a9c2760a
commit 94d1e7874f

View File

@ -227,7 +227,8 @@ void example_without_using_lambda_functions()
int sum = 0;
vect.assign(10, 2);
parallel_for(num_threads, 0, vect.size(), function_object_sum(vect, sum));
function_object_sum funct(vect, sum);
parallel_for(num_threads, 0, vect.size(), funct);
cout << "sum: " << sum << endl;
}