diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-02-20 20:55:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-24 14:16:01 (GMT) |
commit | b917f4c003cb192f461345b66a9af1a3436b86b1 (patch) | |
tree | ab2862e0358e9d3e3c3faeb19f7316576dcb9985 /Source/cmAlgorithms.h | |
parent | bbc1a9788d94ed9a6f710689611c63dcc52c8b09 (diff) | |
download | CMake-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.h | 4 |
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> |