Request: is(typeof(X.init) == X) for all X

Bruno Medeiros brunodomedeirosATgmail at SPAM.com
Sun May 7 04:19:16 PDT 2006


Oskar Linde wrote:
> Hi,
> 
> The subject says it all. This is currently not true for static arrays:
> 
> template test(X) {
>   static assert(is(typeof(X.init) == X));
> }
> 
> struct T{}
> 
> mixin test!(int);
> mixin test!(int *);
> mixin test!(void delegate());
> mixin test!(void function());
> mixin test!(Object);
> mixin test!(T);
> mixin test!(T*);
> mixin test!(char[]);
> mixin test!(char[5]);
> 
> Gives:
> 
> init.d(2): static assert  (is(char == char[5])) is false
> 
> /Oskar
> 

That would be nice, as would be other changes to static arrays "alien 
type" behaviour.

-- 
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list