typeof(typename) fails silently
BCS
ao at pathlink.com
Tue Sep 16 11:43:08 PDT 2008
Reply to Sean,
> I'm of two minds on this. The is expression already requires whatever
> it contains to be a type or there will be a compile-time error, but
> with the change to typeof we no longer have a bullet-proof way of
> ensuring that something is a type. So either we use is(T) and hope T
> is a type or use is(typeof(T)) and hope T is not a type (because if T
> is a type then the condition will silently fail). Neither is ideal,
> for obvious reasons.
>
is(T) || is(typeof(T))
??
More information about the Digitalmars-d-bugs
mailing list