Permalink
Browse files

Merge pull request #1047 from Poita/bug8367

Issue 8367 - Insufficient constraints for chain
  • Loading branch information...
2 parents 4014fe2 + 1008da7 commit ca44a116d5cad084fe1cb968f23c54059984a06e @andralex andralex committed Jan 9, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 std/range.d
View
@@ -2019,7 +2019,9 @@ assert(equal(s, [1, 2, 3, 4, 5, 6, 7][]));
----
*/
auto chain(Ranges...)(Ranges rs)
-if (Ranges.length > 0 && allSatisfy!(isInputRange, staticMap!(Unqual, Ranges)))
+if (Ranges.length > 0 &&
+ allSatisfy!(isInputRange, staticMap!(Unqual, Ranges)) &&
+ !is(CommonType!(staticMap!(ElementType, staticMap!(Unqual, Ranges))) == void))
{
static if (Ranges.length == 1)
{

0 comments on commit ca44a11

Please sign in to comment.