Added usage example to equal

This commit is contained in:
NVolcz 2016-09-12 15:49:26 +02:00 committed by GitHub
parent 96f092bf0e
commit 3c06aae6e5

View file

@ -794,6 +794,7 @@ template equal(alias pred = "a == b")
int[] a = [ 1, 2, 4, 3 ];
assert(!equal(a, a[1..$]));
assert(equal(a, a));
assert(equal!((a, b) => a == b)(a, a));
// different types
double[] b = [ 1.0, 2, 4, 3];