1 module test; 2 3 /// doc 1 4 template isValue(T) 5 { 6 enum isValue = !is(T); 7 } 8 9 /// doc 2 10 template isValue(alias T) 11 { 12 enum isValue = !is(T); 13 } 14 15 /// doc 3 16 template isEqual(alias A, alias B) 17 { 18 static if( isValue!A && isValue!B && __traits(compiles, A == B)) 19 enum isEqual = A == B; 20 else static if(!(isValue!A || isValue!B)) 21 enum isEqual = isSameType!(A, B); 22 else 23 enum isEqual = false; 24 } 25 /// ditto 26 template isEqual(alias A, B) 27 { 28 enum isEqual = false; 29 } 30 /// ditto 31 template isEqual(A, alias B) 32 { 33 enum isEqual = false; 34 } 35 /// ditto 36 template isEqual(A, B) 37 { 38 enum isEqual = isSameType!(A, B); 39 }