is(this == bug) ???
dsimcha
dsimcha at yahoo.com
Wed Apr 1 16:31:50 PDT 2009
void doStuff(T)(T arg)
if(is(typeof(arg))) {
}
void main() {
doStuff(1);
}
Results:
test7.d|6|template test7.doStuff(T) if (is(typeof(arg))) does not match any
function template declaration|
test7.d|6|template test7.doStuff(T) if (is(typeof(arg))) cannot deduce
template function from argument types !()(int)|
This code does not compile with 2.027, 2.026, or 2.016 (the first version that
had constraints). If it is, in fact, a bug, I find it amazing that it's
apparently taken over half a year for anyone to notice. (Searching bugzilla
for "constraints" yields nothing.) If it's not a bug, then I can't for the
life of me figure out why it won't compile.
More information about the Digitalmars-d
mailing list