summaryrefslogtreecommitdiffstats
path: root/Source/cmAlgorithms.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-20 20:55:19 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-24 14:16:01 (GMT)
commitb917f4c003cb192f461345b66a9af1a3436b86b1 (patch)
treeab2862e0358e9d3e3c3faeb19f7316576dcb9985 /Source/cmAlgorithms.h
parentbbc1a9788d94ed9a6f710689611c63dcc52c8b09 (diff)
downloadCMake-b917f4c003cb192f461345b66a9af1a3436b86b1.zip
CMake-b917f4c003cb192f461345b66a9af1a3436b86b1.tar.gz
CMake-b917f4c003cb192f461345b66a9af1a3436b86b1.tar.bz2
cmAlgorithms: Relax cmRemoveN requirement to FwdIter.
cmRotate already requires only FwdIter.
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>