I am confused on comparing iterators in C++. With the following code:
std::iterator< std::forward_iterator_tag, CP_FileSystemSpec> Iter1;
std::iterator< std::forward_iterator_tag, CP_FileSystemSpec> Iter2;
while( ++Iter1 != Iter2 )
{
}
The error is:
error: no match for 'operator++' in '++Iter1'
I seem to recall that you could not do what the code above is doing. But I dont quite know how to do the comparison.