Get rid of unused variables in std/algorithm

This commit is contained in:
RazvanN7 2017-08-02 17:17:28 +03:00
parent 3d0d8188ca
commit 3a4f83577e
5 changed files with 38 additions and 21 deletions

View file

@ -1412,6 +1412,8 @@ setSymmetricDifference(alias less = "a < b", R1, R2)
@safe unittest // Issue 10460
{
import std.algorithm.comparison : equal;
int[] a = [1, 2];
double[] b = [2.0, 3.0];
int[] c = [2, 3];
@ -1423,6 +1425,9 @@ setSymmetricDifference(alias less = "a < b", R1, R2)
alias R2 = typeof(setSymmetricDifference(a, c));
static assert(is(ElementType!R2 == int));
static assert(hasLvalueElements!R2);
assert(equal(setSymmetricDifference(a, b), [1.0, 3.0]));
assert(equal(setSymmetricDifference(a, c), [1, 3]));
}
/++