Permalink
Browse files

Issue 9350 - findAdjacent infinite range warning

  • Loading branch information...
1 parent 00c95c1 commit e7ccc0d45ea242945e20137d3fac8b3f2a51fe76 @Poita Poita committed Jan 18, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 std/algorithm.d
View
@@ -5460,7 +5460,8 @@ Range findAdjacent(alias pred = "a == b", Range)(Range r)
if (binaryFun!(pred)(r.front, ahead.front)) return r;
}
}
- return ahead;
+ static if (!isInfinite!Range)
+ return ahead;
}
unittest

0 comments on commit e7ccc0d

Please sign in to comment.