On 2009-12-17 08:57:32 -0500, "Steven Schveighoffer"
<[email protected]> said:
Adding this to S(T) makes it not work:
struct S(T) if (is(T: Object))
{
T t;
}
Yes indeed. Interestingly you can change it to is(T == class) and now
it works again!
There seem to be no difference between is(T : Object) and is(T ==
class), except that the former prevents forward declarations. I guess
it means that is(T : Object) should not be used. I made a quick search
and found 10 occurrences of it in Phobos.
The same problem happens with template arguments: "template S(T :
Object)" does not work with forward declarations.
--
Michel Fortin
[email protected]
http://michelf.com/