is(ulong : long) evaluates to true, is(int[] S) does not always compile
pc
peng2cheng2 at yahoo.com
Tue Dec 29 23:27:27 PST 2009
Per TDPL p. 66 is(ulong : long) should be false, but see below.
is(int[] S) did no compile outside of static if
Are these bugs?
import std.stdio;
void main(){
bool z = is(int[]); //ok
//bool z = is(int[] AZ); //error only takes (T Sym) in static conditional
static if (is(int[] AZ)) //ok
writeln(typeid(AZ));
bool a = is(uint : int), b = is(ulong : long);
writefln("%s %s",a,b); //==> true true
}
More information about the Digitalmars-d
mailing list