From b917f4c003cb192f461345b66a9af1a3436b86b1 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 20 Feb 2015 21:55:19 +0100 Subject: cmAlgorithms: Relax cmRemoveN requirement to FwdIter. cmRotate already requires only FwdIter. --- Source/cmAlgorithms.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 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 -- cgit v0.12