summaryrefslogtreecommitdiffstats
path: root/Source/cmAlgorithms.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAlgorithms.h')
-rw-r--r--Source/cmAlgorithms.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h
index f90f105..8790732 100644
--- a/Source/cmAlgorithms.h
+++ b/Source/cmAlgorithms.h
@@ -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>