cmAlgorithms: Relax cmRemoveN requirement to FwdIter.

cmRotate already requires only FwdIter.
This commit is contained in:
Stephen Kelly 2015-02-20 21:55:19 +01:00 committed by Brad King
parent bbc1a9788d
commit b917f4c003
1 changed files with 3 additions and 1 deletions

View File

@ -154,7 +154,9 @@ private:
template<typename Iter>
Iter RemoveN(Iter i1, Iter i2, size_t n)
{
return cmRotate(i1, i1 + n, i2);
Iter m = i1;
std::advance(m, n);
return cmRotate(i1, m, i2);
}
template<typename Range>