Skip to content

Commit

Permalink
Fix Issue 5489 - std.typecons tuples dynamically iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
wilzbach committed Dec 21, 2017
1 parent da00e8f commit 059be4d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions std/typecons.d
Expand Up @@ -1316,6 +1316,15 @@ if (distinctFieldNames!(Specs))
assert(!is(typeof(point1) == typeof(point2)));
}

/// Use tuples as ranges
unittest
{
import std.algorithm.iteration : sum;
import std.range : only;
auto t = tuple(1, 2);
assert(t.expand.only.sum == 3);
}

@safe unittest
{
// Bugzilla 4582
Expand Down

0 comments on commit 059be4d

Please sign in to comment.