Is it possible to compare two iterators? Comparison using std :: min
void change ( typename TList <Item *>::Type ::iterator it_begin, typename TList <Item*>::Type ::iterator it_end )
{
....
this->items.resize ( index );
std::sort ( it_begin, std::min (it_end, it_begin += index - 1);
....
}
throws the following exception:
Assertion failed: Vector iterators incompatible...
Is there any other way to compare?
source
share