I am adding OpenMP to existing code, and am trying to parallelize the for loop below. Block is a container implemented in the code. Operators < and ++ are implemented for the Block container.
#pragma omp parallel for // code compiles without this line
for ( Block::iterator it = initValue; it < blockEnd; ++it ) {
// LOOP BODY
}
I get the following error when the OpenMP pragma is there:
No match for 'operator-' (operand types are Block::iterator and Block::iterator)
If I take the pragma out, the code compiles fine, so I am sure my operator definitions are OK. Why does OpenMP require 'operator-' to be implemented here?
Compiler: gcc 7.2.1 OpenMP 4.0