mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 06:30:28 +03:00
Get rid of unused variables in std/algorithm
This commit is contained in:
parent
3d0d8188ca
commit
3a4f83577e
5 changed files with 38 additions and 21 deletions
|
@ -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]));
|
||||
}
|
||||
|
||||
/++
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue