isEqualTypes

2つのTemplateRangeが等しいかどうか検証します。

  1. template isEquals(alias pred, alias A, alias B)
  2. template isEqualTypes(alias A, alias B)
    template isEqualTypes () if (
    isTemplateRange!A &&
    isTemplateRange!B
    ) {
    enum bool isEqualTypes;
    }
  3. template isEqualValues(alias A, alias B)

Examples

1 enum predT(A, B) = is(A == B);
2 alias Ts1 = ToTRange!(int, int, long);
3 alias Ts2 = ToTRange!(int, int, long);
4 
5 static assert(isEquals!(predT, Ts1, Ts2));
6 static assert(isEqualTypes!(Ts1, Ts2));
7 
8 enum predV(alias A, alias B) = A == B;
9 alias Vs1 = ToTRange!(1, 2, 3);
10 alias Vs2 = ToTRange!(1, 2, 3);
11 
12 static assert(isEquals!(predV, Vs1, Vs2));
13 static assert(isEqualValues!(Vs1, Vs2));

Meta