How to assert a function signature in D2.008?

Walter Bright newshound1 at digitalmars.com
Tue Dec 4 12:00:55 PST 2007


Janice Caron wrote:
> This used to compile under D2.007
> 
>     struct A
>     {
>         void f() {}
> 
>         static assert(is(typeof(f)==void function()));
>     }
> 
> It doesn't under D2.008. The only way I've found to make it compile
> under D2.008 is to change it to

Change it to:

is(typeof(&f)==void function())



More information about the Digitalmars-d mailing list